diff options
Diffstat (limited to 'src/frontend/keychooser/cbookkeychooser.h')
-rw-r--r-- | src/frontend/keychooser/cbookkeychooser.h | 142 |
1 files changed, 76 insertions, 66 deletions
diff --git a/src/frontend/keychooser/cbookkeychooser.h b/src/frontend/keychooser/cbookkeychooser.h index 3b32d48..c01e0e9 100644 --- a/src/frontend/keychooser/cbookkeychooser.h +++ b/src/frontend/keychooser/cbookkeychooser.h @@ -1,8 +1,10 @@ /********* * +* In the name of the Father, and of the Son, and of the Holy Spirit. +* * This file is part of BibleTime's source code, http://www.bibletime.info/. * -* Copyright 1999-2011 by the BibleTime developers. +* Copyright 1999-2014 by the BibleTime developers. * The BibleTime source code is licensed under the GNU General Public License version 2.0. * **********/ @@ -20,71 +22,79 @@ class CSwordBookModuleInfo; class CSwordKey; class CSwordTreeKey; -namespace sword { -class TreeKeyIdx; -} - -/** The keychooser implementation for books. - * @author The BibleTime team - */ -class CBookKeyChooser : public CKeyChooser { - Q_OBJECT - public: - CBookKeyChooser(const QList<const CSwordModuleInfo*> &modules, - BTHistory *history, CSwordKey *key = 0, - QWidget *parent = 0); - - /** - Reimplemented from CKeyChooser. - */ - virtual void refreshContent(); - - /** - * Sets another module to this keychooser - */ - virtual void setModules(const QList<const CSwordModuleInfo*> &modules, - bool refresh = false); - /** - * Returns the key of this keychooser - */ - virtual CSwordKey* key(); - /** - * Sets a new key to this keychooser - */ - virtual void setKey(CSwordKey*); - /** - * Sets a new key to this keychooser - */ - void setKey(CSwordKey*, const bool emitSignal); - - - public slots: // Public slots - /** - * Updates the keychoosers for the given key but emit no signal. - */ - void updateKey(CSwordKey*); - - protected: // Protected methods - /** - * Fills the combo given by depth with the items from the key having depth "depth". - * The parent sibling is given by key. - */ - void setupCombo(const QString key, const int depth, const int currentItem); - /** No descriptions */ - virtual void adjustFont(); - - protected slots: - /** - * A keychooser changed. Update and emit a signal if necessary. - */ - void keyChooserChanged(int); - virtual void setKey(QString& newKey); - - private: - QList<CKeyChooserWidget*> m_chooserWidgets; - QList<const CSwordBookModuleInfo*> m_modules; - CSwordTreeKey *m_key; - QHBoxLayout* m_layout; +/** + \brief The keychooser implementation for books. +*/ +class CBookKeyChooser: public CKeyChooser { + + Q_OBJECT + +public: + + CBookKeyChooser(const QList<const CSwordModuleInfo *> & modules, + BTHistory * history, + CSwordKey * key = 0, + QWidget * parent = 0); + + /** + Reimplemented from CKeyChooser. + */ + virtual void refreshContent(); + + /** + * Sets another module to this keychooser + */ + virtual void setModules(const QList<const CSwordModuleInfo *> & modules, + bool refresh = false); + /** + * Returns the key of this keychooser + */ + virtual CSwordKey * key(); + + /** + * Sets a new key to this keychooser + */ + virtual void setKey(CSwordKey * key); + + /** + * Sets a new key to this keychooser + */ + void setKey(CSwordKey * key, const bool emitSignal); + +public slots: // Public slots + + /** + * Updates the keychoosers for the given key but emit no signal. + */ + void updateKey(CSwordKey * key); + +protected: /* Methods: */ + + /** + * Fills the combo given by depth with the items from the key having depth "depth". + * The parent sibling is given by key. + */ + void setupCombo(const QString & key, const int depth, const int currentItem); + + /** No descriptions */ + virtual void adjustFont(); + +protected slots: + + /** + * A keychooser changed. Update and emit a signal if necessary. + */ + void keyChooserChanged(int); + + virtual void setKey(const QString & newKey); + +private: /* Fields: */ + + QList<CKeyChooserWidget *> m_chooserWidgets; + QList<const CSwordBookModuleInfo *> m_modules; + CSwordTreeKey * m_key; + QHBoxLayout * m_layout; + }; #endif |