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. More... | |
void | adjustButtonCount (int const numButtons, CDisplayWindow *const window) |
Ensures exactly numButtons buttons.. More... | |
void | updateButtonMenus (BtModuleList const &modules) |
Private Attributes | |
QList< BtModuleChooserButton * > | m_buttonList |
CSwordModuleInfo::ModuleType | m_moduleType = CSwordModuleInfo::Unknown |
Definition at line 25 of file btmodulechooserbar.h.
BtModuleChooserBar::BtModuleChooserBar | ( | QWidget * | parent | ) |
Definition at line 24 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 55 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 38 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 82 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 31 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 105 of file btmodulechooserbar.cpp.
References leftLikeParallelModules(), and m_buttonList.
Referenced by associateWithWindow(), and setModules().
|
private |
Definition at line 61 of file btmodulechooserbar.h.
Referenced by addButton(), adjustButtonCount(), associateWithWindow(), and updateButtonMenus().
|
private |
Definition at line 62 of file btmodulechooserbar.h.
Referenced by addButton(), associateWithWindow(), and setModules().