BibleTime
|
#include <cbookkeychooser.h>
Public Slots | |
void | updateKey (CSwordKey *key) final override |
Updates the keychoosers for the given key but emit no signal. More... | |
Public Slots inherited from CKeyChooser | |
void | handleHistoryMoved (QString const &newKey) |
virtual void | updateKey (CSwordKey *key)=0 |
Public Member Functions | |
CBookKeyChooser (BtConstModuleList const &modules, CSwordKey *key=nullptr, QWidget *parent=nullptr) | |
CSwordKey * | key () final override |
void | refreshContent () final override |
void | setKey (CSwordKey *key) final override |
void | setKey (CSwordKey *key, bool const emitSignal) |
Sets a new key to this keychooser. More... | |
void | setModules (BtConstModuleList const &modules, bool refresh=false) final override |
Protected Member Functions | |
void | setupCombo (QString const &key, int const depth, int const currentItem) |
Protected Member Functions inherited from CKeyChooser | |
CKeyChooser (QWidget *parent=nullptr) | |
Private Slots | |
void | keyChooserChanged (int) |
A keychooser changed. Update and emit a signal if necessary. More... | |
Private Member Functions | |
void | adjustFont () |
Private Attributes | |
QList< CKeyChooserWidget * > | m_chooserWidgets |
CSwordTreeKey * | m_key |
QHBoxLayout * | m_layout |
QList< CSwordBookModuleInfo const * > | m_modules |
Additional Inherited Members | |
Signals inherited from CKeyChooser | |
void | keyChanged (CSwordKey *newKey) |
Static Public Member Functions inherited from CKeyChooser | |
static CKeyChooser * | createInstance (const BtConstModuleList &modules, CSwordKey *key, QWidget *parent) |
Definition at line 30 of file cbookkeychooser.h.
CBookKeyChooser::CBookKeyChooser | ( | BtConstModuleList const & | modules, |
CSwordKey * | key = nullptr , |
||
QWidget * | parent = nullptr |
||
) |
Definition at line 38 of file cbookkeychooser.cpp.
References adjustFont(), key(), m_key, setKey(), and setModules().
|
private |
No descriptions
Definition at line 203 of file cbookkeychooser.cpp.
References btConfig(), BtConfig::getFontForLanguage(), m_chooserWidgets, and m_modules.
Referenced by CBookKeyChooser(), and setModules().
|
finaloverridevirtual |
Returns the key of this kechooser.
Implements CKeyChooser.
Definition at line 124 of file cbookkeychooser.cpp.
References m_key.
Referenced by CBookKeyChooser(), setKey(), setupCombo(), and updateKey().
|
privateslot |
A keychooser changed. Update and emit a signal if necessary.
A keychooser changed. Update and emit a signal if necessary.
Definition at line 241 of file cbookkeychooser.cpp.
References BT_ASSERT, CKeyChooserWidget::comboBox(), ID_PROPERTY_NAME, m_chooserWidgets, m_key, CSwordTreeKey::setKey(), and setKey().
Referenced by setModules().
|
finaloverridevirtual |
Refreshes the content.
Implements CKeyChooser.
Definition at line 212 of file cbookkeychooser.cpp.
References m_key, and updateKey().
|
finaloverridevirtual |
Sets the CKey
key | the key which the widget should be set to. |
Implements CKeyChooser.
Definition at line 51 of file cbookkeychooser.cpp.
Referenced by CBookKeyChooser(), keyChooserChanged(), and updateKey().
void CBookKeyChooser::setKey | ( | CSwordKey * | newKey, |
bool const | emitSignal | ||
) |
Sets a new key to this keychooser.
Sets a new key to this keychooser
Definition at line 56 of file cbookkeychooser.cpp.
References CSwordTreeKey::getLocalNameUnicode(), CSwordTreeKey::hasChildren(), CSwordTreeKey::key(), key(), CKeyChooser::keyChanged(), m_chooserWidgets, m_key, m_modules, CSwordTreeKey::offset(), CSwordTreeKey::positionToFirstChild(), CSwordTreeKey::positionToNextSibling(), CSwordTreeKey::positionToRoot(), CKeyChooserWidget::reset(), CSwordTreeKey::setKey(), CSwordTreeKey::setOffset(), and setupCombo().
|
finaloverridevirtual |
Sets another module to this keychooser
Implements CKeyChooser.
Definition at line 129 of file cbookkeychooser.cpp.
References adjustFont(), BT_ASSERT, BT_CONNECT, CKeyChooserWidget::changed(), CKeyChooserWidget::comboBox(), CKeyChooserWidget::focusOut(), CSwordModuleInfo::GenericBook, ID_PROPERTY_NAME, keyChooserChanged(), m_chooserWidgets, m_key, m_layout, m_modules, and updateKey().
Referenced by CBookKeyChooser().
|
protected |
Fills the combo given by depth with the items from the key having depth "depth". The parent sibling is given by key.
Definition at line 217 of file cbookkeychooser.cpp.
References CSwordTreeKey::getLocalNameUnicode(), key(), m_chooserWidgets, m_key, CSwordTreeKey::positionToFirstChild(), CSwordTreeKey::positionToNextSibling(), CSwordTreeKey::positionToParent(), CKeyChooserWidget::reset(), and CSwordTreeKey::setKey().
Referenced by setKey().
|
finaloverrideslot |
Updates the keychoosers for the given key but emit no signal.
Updates the keychoosers for the given key but emit no signal.
Definition at line 262 of file cbookkeychooser.cpp.
References key(), and setKey().
Referenced by refreshContent(), and setModules().
|
private |
Definition at line 77 of file cbookkeychooser.h.
Referenced by adjustFont(), keyChooserChanged(), setKey(), setModules(), and setupCombo().
|
private |
Definition at line 79 of file cbookkeychooser.h.
Referenced by CBookKeyChooser(), key(), keyChooserChanged(), refreshContent(), setKey(), setModules(), and setupCombo().
|
private |
Definition at line 80 of file cbookkeychooser.h.
Referenced by setModules().
|
private |
Definition at line 78 of file cbookkeychooser.h.
Referenced by adjustFont(), setKey(), and setModules().