13
#include <QToolButton>
16
16
#include "backend/managers/cswordbackend.h"
17
19
class CSwordModuleInfo;
21
#include <QToolButton>
25
22
/** This class manages the display options of the selected modules.
26
23
* @author The BibleTime team
28
25
class CDisplaySettingsButton : public QToolButton {
32
CDisplaySettingsButton(CSwordBackend::DisplayOptions *displaySettings, CSwordBackend::FilterOptions *settings, const QList<CSwordModuleInfo*>& useModules, QWidget *parent=0);
33
void reset(const QList<CSwordModuleInfo*>& useModules);
35
* Sets the item at position pos to the satet given as 2nd paramter.
37
void setItemStatus( const int pos, const bool checked );
39
* Returns the number of usable menu items in the setttings menu.
43
* Returns the status of the item at position "index"
45
bool itemStatus( const int index );
47
* Sets the status to changed. The signal changed will be emitted.
52
void sigChanged(void);
55
void optionToggled(QAction* action);
59
/** This enum marks the option types for a display. Used internally.*/
60
enum OptionType {Linebreak, Versenum, Headings, WordsofJ, Vowel, Cantillation, Accents,
61
Variant, Xref, Morphseg};
63
CSwordBackend::FilterOptions* m_moduleSettings;
64
CSwordBackend::DisplayOptions* m_displaySettings;
65
CSwordBackend::FilterOptions m_available;
66
QList<CSwordModuleInfo*> m_modules;
68
QHash<QString, int> m_dict;
73
bool isOptionAvailable( const CSwordModuleInfo::FilterTypes option);
74
int addMenuEntry( const QString name, OptionType type, const int* option, const bool available);
29
CDisplaySettingsButton(CSwordBackend::DisplayOptions *displaySettings, CSwordBackend::FilterOptions *settings, const QList<CSwordModuleInfo*>& useModules, QWidget *parent = 0);
30
void reset(const QList<CSwordModuleInfo*>& useModules);
32
* Sets the item at position pos to the satet given as 2nd paramter.
34
void setItemStatus( const int pos, const bool checked );
36
* Returns the number of usable menu items in the setttings menu.
40
* Returns the status of the item at position "index"
42
bool itemStatus( const int index );
44
* Sets the status to changed. The signal changed will be emitted.
49
void sigChanged(void);
52
void optionToggled(QAction* action);
56
/** This enum marks the option types for a display. Used internally.*/
57
enum OptionType {Linebreak, Versenum, Headings, WordsofJ, Vowel, Cantillation, Accents,
58
Variant, Xref, Morphseg
61
CSwordBackend::FilterOptions* m_moduleSettings;
62
CSwordBackend::DisplayOptions* m_displaySettings;
63
CSwordBackend::FilterOptions m_available;
64
QList<CSwordModuleInfo*> m_modules;
66
QHash<QString, int> m_dict;
71
bool isOptionAvailable( const CSwordModuleInfo::FilterTypes option);
72
int addMenuEntry( const QString name, OptionType type, const int* option, const bool available);