BibleTime
Public Slots | Public Member Functions | Protected Member Functions | Private Slots | Private Member Functions | Private Attributes | List of all members
CBookKeyChooser Class Referencefinal

#include <cbookkeychooser.h>

Inheritance diagram for CBookKeyChooser:

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)
 
CSwordKeykey () 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
 
CSwordTreeKeym_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 CKeyChoosercreateInstance (const BtConstModuleList &modules, CSwordKey *key, QWidget *parent)
 

Detailed Description

Definition at line 30 of file cbookkeychooser.h.

Constructor & Destructor Documentation

◆ CBookKeyChooser()

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().

Member Function Documentation

◆ adjustFont()

void CBookKeyChooser::adjustFont ( )
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().

◆ key()

CSwordKey * CBookKeyChooser::key ( )
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().

◆ keyChooserChanged

void CBookKeyChooser::keyChooserChanged ( int  newIndex)
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().

◆ refreshContent()

void CBookKeyChooser::refreshContent ( )
finaloverridevirtual

Refreshes the content.

Implements CKeyChooser.

Definition at line 212 of file cbookkeychooser.cpp.

References m_key, and updateKey().

◆ setKey() [1/2]

void CBookKeyChooser::setKey ( CSwordKey key)
finaloverridevirtual

Sets the CKey

Parameters
keythe key which the widget should be set to.

Implements CKeyChooser.

Definition at line 51 of file cbookkeychooser.cpp.

Referenced by CBookKeyChooser(), keyChooserChanged(), and updateKey().

◆ setKey() [2/2]

void CBookKeyChooser::setKey ( CSwordKey newKey,
bool const  emitSignal 
)

◆ setModules()

void CBookKeyChooser::setModules ( BtConstModuleList const &  modules,
bool  refresh = false 
)
finaloverridevirtual

◆ setupCombo()

void CBookKeyChooser::setupCombo ( QString const &  key,
int const  depth,
int const  currentItem 
)
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().

◆ updateKey

void CBookKeyChooser::updateKey ( CSwordKey key)
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().

Member Data Documentation

◆ m_chooserWidgets

QList<CKeyChooserWidget *> CBookKeyChooser::m_chooserWidgets
private

Definition at line 77 of file cbookkeychooser.h.

Referenced by adjustFont(), keyChooserChanged(), setKey(), setModules(), and setupCombo().

◆ m_key

CSwordTreeKey* CBookKeyChooser::m_key
private

◆ m_layout

QHBoxLayout* CBookKeyChooser::m_layout
private

Definition at line 80 of file cbookkeychooser.h.

Referenced by setModules().

◆ m_modules

QList<CSwordBookModuleInfo const *> CBookKeyChooser::m_modules
private

Definition at line 78 of file cbookkeychooser.h.

Referenced by adjustFont(), setKey(), and setModules().


The documentation for this class was generated from the following files: