BibleTime
btmodulechooserbar.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-2025 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 <QToolBar>
16
17#include <QList>
18#include "../../backend/drivers/btmodulelist.h"
19#include "../../backend/drivers/cswordmoduleinfo.h"
20
21
22class CDisplayWindow;
24
25class BtModuleChooserBar final: public QToolBar {
26
27 Q_OBJECT
28
29public:
30
32
33 /** Initialize with module list.*/
35
36private Q_SLOTS:
37
38 void setModules(BtModuleList newModules);
39
40private: /* Methods: */
41
42 /**
43 \brief Adds an empty button to the toolbar.
44 \param[in] window The display window to connect the button with.
45 */
47
48 /** Updates every button's menu without recreating it.*/
49 void updateButtonMenus(BtModuleList const & modules);
50
51 /**
52 \brief Ensures exactly numButtons buttons..
53 \param[in] numButtons The exact number of buttons required.
54 \param[in] window The display window to connect the buttons with.
55 */
56 void adjustButtonCount(int const numButtons,
57 CDisplayWindow * const window);
58
59private: /* Fields: */
60
61 QList<BtModuleChooserButton *> m_buttonList;
63
64};
QList< CSwordModuleInfo * > BtModuleList
void updateButtonMenus(BtModuleList const &modules)
void associateWithWindow(CDisplayWindow *window)
QList< BtModuleChooserButton * > m_buttonList
CSwordModuleInfo::ModuleType m_moduleType
void adjustButtonCount(int const numButtons, CDisplayWindow *const window)
Ensures exactly numButtons buttons..
void setModules(BtModuleList newModules)
BtModuleChooserButton * addButton(CDisplayWindow *const window)
Adds an empty button to the toolbar.
The base class for all display windows of BibleTime.