|
BibleTime
|
#include <btmodulechooserbar.h>
Public Member Functions | |
| void | associateWithWindow (CDisplayWindow *window) |
| BtModuleChooserBar (QWidget *parent) | |
Private Slots | |
| void | setModules (BtModuleList newModules) |
Private Member Functions | |
| BtModuleChooserButton * | addButton (CDisplayWindow *const window) |
| Adds an empty button to the toolbar. | |
| void | adjustButtonCount (int const numButtons, CDisplayWindow *const window) |
| Ensures exactly numButtons buttons.. | |
| void | updateButtonMenus (BtModuleList const &modules) |
Private Attributes | |
| QList< BtModuleChooserButton * > | m_buttonList |
| std::optional< CSwordModuleInfo::ModuleType > | m_moduleType |
Definition at line 26 of file btmodulechooserbar.h.
| BtModuleChooserBar::BtModuleChooserBar | ( | QWidget * | parent | ) |
Definition at line 23 of file btmodulechooserbar.cpp.
|
private |
Adds an empty button to the toolbar.
| [in] | window | The display window to connect the button with. |
Definition at line 54 of file btmodulechooserbar.cpp.
References BT_CONNECT, m_buttonList, m_moduleType, BtModuleChooserButton::sigModuleAdd(), BtModuleChooserButton::sigModuleRemove(), BtModuleChooserButton::sigModuleReplace(), CDisplayWindow::slotAddModule(), CDisplayWindow::slotRemoveModule(), and CDisplayWindow::slotReplaceModule().
Referenced by adjustButtonCount(), and associateWithWindow().
|
private |
Ensures exactly numButtons buttons..
| [in] | numButtons | The exact number of buttons required. |
| [in] | window | The display window to connect the buttons with. |
Definition at line 37 of file btmodulechooserbar.cpp.
References addButton(), and m_buttonList.
Referenced by setModules().
| void BtModuleChooserBar::associateWithWindow | ( | CDisplayWindow * | window | ) |
Initialize with module list.
Sets the modules which are chosen in this module chooser bar.
Definition at line 81 of file btmodulechooserbar.cpp.
References addButton(), BT_ASSERT, BT_CONNECT, CSwordModuleInfo::GenericBook, m_buttonList, m_moduleType, CDisplayWindow::modules(), setModules(), CDisplayWindow::sigModuleListChanged(), and updateButtonMenus().
Referenced by CDisplayWindow::CDisplayWindow(), CDisplayWindow::setupMainWindowToolBars(), and CBookReadWindow::setupMainWindowToolBars().
|
privateslot |
Definition at line 30 of file btmodulechooserbar.cpp.
References adjustButtonCount(), CSwordModuleInfo::GenericBook, m_moduleType, and updateButtonMenus().
Referenced by associateWithWindow().
|
private |
Updates every button's menu without recreating it.
Definition at line 104 of file btmodulechooserbar.cpp.
References leftLikeParallelModules(), and m_buttonList.
Referenced by associateWithWindow(), and setModules().
|
private |
Definition at line 62 of file btmodulechooserbar.h.
Referenced by addButton(), adjustButtonCount(), associateWithWindow(), and updateButtonMenus().
|
private |
Definition at line 63 of file btmodulechooserbar.h.
Referenced by addButton(), associateWithWindow(), and setModules().