BibleTime
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  */
32  Q_OBJECT
33 
34  public:
35  BtDisplaySettingsButton(QWidget *parent = nullptr);
36 
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:
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 
60  void addMenuEntry(QAction *action, bool checked);
61 
62  private:
66 
78 };
QList< CSwordModuleInfo const * > BtConstModuleList
Definition: btmodulelist.h:21
void sigDisplayOptionsChanged(DisplayOptions displayOptions)
void setFilterOptions(FilterOptions const &moduleSettings)
bool isOptionAvailable(CSwordModuleInfo::FilterOption const &option)
BtDisplaySettingsButton(QWidget *parent=nullptr)
void addMenuEntry(QAction *action, bool checked)
void sigFilterOptionsChanged(FilterOptions filterOptions)
void setDisplayOptions(DisplayOptions const &displaySettings)
void setDisplayOptionsNoRepopulate(DisplayOptions const &displaySettings)
void setFilterOptionsNoRepopulate(FilterOptions const &moduleSettings)
void sigModulesChanged(const BtConstModuleList &modules)
void setModules(const BtConstModuleList &modules)