BibleTime
src
frontend
displaywindow
btdisplaysettingsbutton.h
Go to the documentation of this file.
1
/*********
2
*
3
* In the name of the Father, and of the Son, and of the Holy Spirit.
4
*
5
* This file is part of BibleTime's source code, https://bibletime.info/
6
*
7
* Copyright 1999-2021 by the BibleTime developers.
8
* The BibleTime source code is licensed under the GNU General Public License
9
* version 2.0.
10
*
11
**********/
12
13
#pragma once
14
15
#include <QToolButton>
16
17
#include <QObject>
18
#include <QString>
19
#include "../../backend/btglobal.h"
20
#include "../../backend/drivers/btmodulelist.h"
21
#include "../../backend/drivers/cswordmoduleinfo.h"
22
23
24
class
QAction
;
25
class
QMenu
;
26
class
QWidget
;
27
28
/** This class manages the display options of the selected modules.
29
* @author The BibleTime team
30
*/
31
class
BtDisplaySettingsButton
:
public
QToolButton
{
32
Q_OBJECT
33
34
public
:
35
BtDisplaySettingsButton
(
QWidget
*parent =
nullptr
);
36
37
void
setDisplayOptionsNoRepopulate
(
38
DisplayOptions
const
& displaySettings);
39
void
setFilterOptionsNoRepopulate
(
FilterOptions
const
& moduleSettings);
40
41
public
Q_SLOTS:
42
void
setDisplayOptions
(
DisplayOptions
const
& displaySettings);
43
void
setFilterOptions
(
FilterOptions
const
& moduleSettings);
44
45
void
setModules
(
const
BtConstModuleList
&modules);
46
47
Q_SIGNALS:
48
void
sigFilterOptionsChanged
(
FilterOptions
filterOptions);
49
void
sigDisplayOptionsChanged
(
DisplayOptions
displayOptions);
50
void
sigModulesChanged
(
const
BtConstModuleList
&modules);
51
void
sigChanged
();
52
53
protected
:
54
void
initMenu
();
55
void
retranslateUi
();
56
void
retranslateToolTip
();
57
void
repopulateMenu
();
58
59
bool
isOptionAvailable
(
CSwordModuleInfo::FilterOption
const
& option);
60
void
addMenuEntry
(
QAction
*action,
bool
checked);
61
62
private
:
63
FilterOptions
m_filterOptions
;
64
DisplayOptions
m_displayOptions
;
65
BtConstModuleList
m_modules
;
66
67
QMenu
*
m_popup
;
68
QAction
*
m_verseNumbersAction
;
69
QAction
*
m_headingsAction
;
70
QAction
*
m_redWordsAction
;
71
QAction
*
m_hebrewPointsAction
;
72
QAction
*
m_hebrewCantillationAction
;
73
QAction
*
m_greekAccentsAction
;
74
QAction
*
m_variantAction
;
75
QAction
*
m_scriptureReferencesAction
;
76
QAction
*
m_footnotesAction
;
77
QAction
*
m_morphSegmentationAction
;
78
};
BtConstModuleList
QList< CSwordModuleInfo const * > BtConstModuleList
Definition:
btmodulelist.h:21
BtDisplaySettingsButton
Definition:
btdisplaysettingsbutton.h:31
BtDisplaySettingsButton::retranslateUi
void retranslateUi()
Definition:
btdisplaysettingsbutton.cpp:146
BtDisplaySettingsButton::m_hebrewPointsAction
QAction * m_hebrewPointsAction
Definition:
btdisplaysettingsbutton.h:71
BtDisplaySettingsButton::m_variantAction
QAction * m_variantAction
Definition:
btdisplaysettingsbutton.h:74
BtDisplaySettingsButton::m_redWordsAction
QAction * m_redWordsAction
Definition:
btdisplaysettingsbutton.h:70
BtDisplaySettingsButton::sigDisplayOptionsChanged
void sigDisplayOptionsChanged(DisplayOptions displayOptions)
BtDisplaySettingsButton::m_headingsAction
QAction * m_headingsAction
Definition:
btdisplaysettingsbutton.h:69
BtDisplaySettingsButton::m_scriptureReferencesAction
QAction * m_scriptureReferencesAction
Definition:
btdisplaysettingsbutton.h:75
BtDisplaySettingsButton::m_footnotesAction
QAction * m_footnotesAction
Definition:
btdisplaysettingsbutton.h:76
BtDisplaySettingsButton::m_displayOptions
DisplayOptions m_displayOptions
Definition:
btdisplaysettingsbutton.h:64
BtDisplaySettingsButton::setFilterOptions
void setFilterOptions(FilterOptions const &moduleSettings)
Definition:
btdisplaysettingsbutton.cpp:97
BtDisplaySettingsButton::m_hebrewCantillationAction
QAction * m_hebrewCantillationAction
Definition:
btdisplaysettingsbutton.h:72
BtDisplaySettingsButton::repopulateMenu
void repopulateMenu()
Definition:
btdisplaysettingsbutton.cpp:171
BtDisplaySettingsButton::isOptionAvailable
bool isOptionAvailable(CSwordModuleInfo::FilterOption const &option)
Definition:
btdisplaysettingsbutton.cpp:238
BtDisplaySettingsButton::retranslateToolTip
void retranslateToolTip()
Definition:
btdisplaysettingsbutton.cpp:161
BtDisplaySettingsButton::m_morphSegmentationAction
QAction * m_morphSegmentationAction
Definition:
btdisplaysettingsbutton.h:77
BtDisplaySettingsButton::m_greekAccentsAction
QAction * m_greekAccentsAction
Definition:
btdisplaysettingsbutton.h:73
BtDisplaySettingsButton::BtDisplaySettingsButton
BtDisplaySettingsButton(QWidget *parent=nullptr)
Definition:
btdisplaysettingsbutton.cpp:27
BtDisplaySettingsButton::addMenuEntry
void addMenuEntry(QAction *action, bool checked)
Definition:
btdisplaysettingsbutton.cpp:233
BtDisplaySettingsButton::initMenu
void initMenu()
Definition:
btdisplaysettingsbutton.cpp:111
BtDisplaySettingsButton::sigFilterOptionsChanged
void sigFilterOptionsChanged(FilterOptions filterOptions)
BtDisplaySettingsButton::m_popup
QMenu * m_popup
Definition:
btdisplaysettingsbutton.h:67
BtDisplaySettingsButton::setDisplayOptions
void setDisplayOptions(DisplayOptions const &displaySettings)
Definition:
btdisplaysettingsbutton.cpp:90
BtDisplaySettingsButton::m_verseNumbersAction
QAction * m_verseNumbersAction
Definition:
btdisplaysettingsbutton.h:68
BtDisplaySettingsButton::m_filterOptions
FilterOptions m_filterOptions
Definition:
btdisplaysettingsbutton.h:63
BtDisplaySettingsButton::setDisplayOptionsNoRepopulate
void setDisplayOptionsNoRepopulate(DisplayOptions const &displaySettings)
Definition:
btdisplaysettingsbutton.cpp:81
BtDisplaySettingsButton::setFilterOptionsNoRepopulate
void setFilterOptionsNoRepopulate(FilterOptions const &moduleSettings)
Definition:
btdisplaysettingsbutton.cpp:86
BtDisplaySettingsButton::m_modules
BtConstModuleList m_modules
Definition:
btdisplaysettingsbutton.h:65
BtDisplaySettingsButton::sigChanged
void sigChanged()
BtDisplaySettingsButton::sigModulesChanged
void sigModulesChanged(const BtConstModuleList &modules)
BtDisplaySettingsButton::setModules
void setModules(const BtConstModuleList &modules)
Definition:
btdisplaysettingsbutton.cpp:104
QAction
QMenu
QToolButton
QWidget
CSwordModuleInfo::FilterOption
Definition:
cswordmoduleinfo.h:55
DisplayOptions
Definition:
btglobal.h:46
FilterOptions
Definition:
btglobal.h:25
Generated by
1.9.1