BibleTime
|
#include <cbooktreechooser.h>
Public Slots | |
void | updateKey (CSwordKey *) final override |
Public Slots inherited from CKeyChooser | |
void | handleHistoryMoved (QString const &newKey) |
virtual void | updateKey (CSwordKey *key)=0 |
Public Member Functions | |
CBookTreeChooser (BtConstModuleList const &modules, CSwordKey *key=nullptr, QWidget *parent=nullptr) | |
CSwordKey * | key () final override |
void | refreshContent () final override |
void | setKey (CSwordKey *key) final override |
void | setModules (BtConstModuleList const &modules, bool refresh=true) final override |
Protected Member Functions | |
void | showEvent (QShowEvent *const showEvent) override |
Protected Member Functions inherited from CKeyChooser | |
CKeyChooser (QWidget *parent=nullptr) | |
Private Slots | |
void | itemActivated (QTreeWidgetItem *item) |
Private Member Functions | |
void | addKeyChildren (CSwordTreeKey *key, QTreeWidgetItem *item) |
void | adjustFont () |
void | setupTree () |
Creates the first level of the tree structure. More... | |
Private Attributes | |
CSwordTreeKey * | m_key |
QList< CSwordBookModuleInfo const * > | m_modules |
QTreeWidget * | m_treeView |
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 cbooktreechooser.h.
CBookTreeChooser::CBookTreeChooser | ( | BtConstModuleList const & | modules, |
CSwordKey * | key = nullptr , |
||
QWidget * | parent = nullptr |
||
) |
Definition at line 33 of file cbooktreechooser.cpp.
References adjustFont(), BT_CONNECT, itemActivated(), key(), m_key, m_modules, m_treeView, setKey(), and setModules().
|
private |
Populates tree widget with items.
Definition at line 171 of file cbooktreechooser.cpp.
References CSwordKey::key(), and key().
Referenced by setupTree().
|
private |
From ckeychooser.
Definition at line 113 of file cbooktreechooser.cpp.
References btConfig(), m_modules, and m_treeView.
Referenced by CBookTreeChooser(), and setModules().
|
privateslot |
Slot for signal when item is selected by user.
Definition at line 132 of file cbooktreechooser.cpp.
References CKeyChooser::keyChanged(), m_key, and CSwordTreeKey::setKey().
Referenced by CBookTreeChooser().
|
inlinefinaloverridevirtual |
Implements CKeyChooser.
Definition at line 44 of file cbooktreechooser.h.
References m_key.
Referenced by addKeyChildren(), CBookTreeChooser(), setKey(), and updateKey().
|
finaloverridevirtual |
Refreshes the content. Inherited from ckeychooser.
Implements CKeyChooser.
Definition at line 120 of file cbooktreechooser.cpp.
References m_key, and updateKey().
|
finaloverridevirtual |
Sets a new key to this keychooser. Inherited from ckeychooser.
Implements CKeyChooser.
Definition at line 66 of file cbooktreechooser.cpp.
References CSwordTreeKey::key(), key(), m_key, and m_treeView.
Referenced by CBookTreeChooser(), setupTree(), and updateKey().
|
finaloverridevirtual |
Sets the module of this keychooser and refreshes the comboboxes
Implements CKeyChooser.
Definition at line 88 of file cbooktreechooser.cpp.
References adjustFont(), m_key, m_modules, CSwordTreeKey::offset(), CSwordTreeKey::setOffset(), and setupTree().
Referenced by CBookTreeChooser(), and CBookReadWindow::modulesChanged().
|
private |
Creates the first level of the tree structure.
Creates the tree structure in the view.
Definition at line 158 of file cbooktreechooser.cpp.
References addKeyChildren(), m_key, m_treeView, CSwordTreeKey::offset(), CSwordTreeKey::positionToRoot(), setKey(), and CSwordTreeKey::setOffset().
Referenced by setModules(), and showEvent().
|
overrideprotected |
Reimplementation to handle tree creation on show.
Definition at line 147 of file cbooktreechooser.cpp.
References m_treeView, and setupTree().
|
finaloverrideslot |
Inherited from ckeychooser
Definition at line 142 of file cbooktreechooser.cpp.
References key(), and setKey().
Referenced by CBookReadWindow::initConnections(), and refreshContent().
|
private |
Definition at line 69 of file cbooktreechooser.h.
Referenced by CBookTreeChooser(), itemActivated(), key(), refreshContent(), setKey(), setModules(), and setupTree().
|
private |
Definition at line 68 of file cbooktreechooser.h.
Referenced by adjustFont(), CBookTreeChooser(), and setModules().
|
private |
Definition at line 70 of file cbooktreechooser.h.
Referenced by adjustFont(), CBookTreeChooser(), setKey(), setupTree(), and showEvent().