BibleTime
|
#include <btmodulechooserbutton.h>
Signals | |
void | sigModuleAdd (int index, CSwordModuleInfo *module) |
void | sigModuleRemove (int index) |
void | sigModuleReplace (int index, CSwordModuleInfo *newModule) |
Public Member Functions | |
BtModuleChooserButton (CSwordModuleInfo::ModuleType mtype, QWidget *parent=nullptr) | |
Constructs an new empty button. More... | |
void | updateMenu (BtModuleList newModulesToUse, CSwordModuleInfo *thisModule, int newIndex, int leftLikeModules) |
Private Slots | |
void | moduleChosen (CSwordModuleInfo *const module) |
Private Member Functions | |
QIcon const & | icon () |
Private Attributes | |
BtModuleChooserMenu * | m_popup |
Definition at line 32 of file btmodulechooserbutton.h.
BtModuleChooserButton::BtModuleChooserButton | ( | CSwordModuleInfo::ModuleType | mtype, |
QWidget * | parent = nullptr |
||
) |
Constructs an new empty button.
Definition at line 21 of file btmodulechooserbutton.cpp.
References BT_CONNECT, icon(), m_popup, moduleChosen(), and BtModuleChooserMenu::sigModuleChosen().
|
private |
Returns the icon used for the current status.
Definition at line 39 of file btmodulechooserbutton.cpp.
References CSwordModuleInfo::Bible, CSwordModuleInfo::Commentary, CSwordModuleInfo::GenericBook, CSwordModuleInfo::Lexicon, m_popup, BtModuleChooserMenu::moduleType(), and BtModuleChooserMenu::selectedModule().
Referenced by BtModuleChooserButton(), moduleChosen(), and updateMenu().
|
privateslot |
Handle the action signal from the menu.
Is called after a module was selected in the popup
Definition at line 84 of file btmodulechooserbutton.cpp.
References BtModuleChooserMenu::buttonIndex(), icon(), m_popup, CSwordModuleInfo::moduleIcon(), BtModuleChooserMenu::selectedModule(), BtModuleChooserMenu::setSelectedModule(), sigModuleAdd(), sigModuleRemove(), and sigModuleReplace().
Referenced by BtModuleChooserButton().
|
signal |
User selected a module from menu to add.
Referenced by BtModuleChooserBar::addButton(), and moduleChosen().
|
signal |
User selected a module from menu to be removed.
Referenced by BtModuleChooserBar::addButton(), and moduleChosen().
|
signal |
User selected a module from menu to replace another module.
Referenced by BtModuleChooserBar::addButton(), and moduleChosen().
void BtModuleChooserButton::updateMenu | ( | BtModuleList | newModulesToUse, |
CSwordModuleInfo * | thisModule, | ||
int | newIndex, | ||
int | leftLikeModules | ||
) |
Definition at line 62 of file btmodulechooserbutton.cpp.
References icon(), m_popup, CSwordModuleInfo::moduleIcon(), CSwordModuleInfo::name(), and BtModuleChooserMenu::update().
|
private |
Definition at line 72 of file btmodulechooserbutton.h.
Referenced by BtModuleChooserButton(), icon(), moduleChosen(), and updateMenu().