summaryrefslogtreecommitdiff
path: root/src/frontend/keychooser/ckeychooser.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/keychooser/ckeychooser.h')
-rw-r--r--src/frontend/keychooser/ckeychooser.h57
1 files changed, 31 insertions, 26 deletions
diff --git a/src/frontend/keychooser/ckeychooser.h b/src/frontend/keychooser/ckeychooser.h
index 4441df0..2a52de3 100644
--- a/src/frontend/keychooser/ckeychooser.h
+++ b/src/frontend/keychooser/ckeychooser.h
@@ -2,7 +2,7 @@
*
* This file is part of BibleTime's source code, http://www.bibletime.info/.
*
-* Copyright 1999-2008 by the BibleTime developers.
+* Copyright 1999-2011 by the BibleTime developers.
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
*
**********/
@@ -32,46 +32,50 @@ class CKeyChooser : public QWidget {
/**
* Creates a proper Instance, either
- *
- @ref CLexiconKeyChooser or
+ * @ref CLexiconKeyChooser or
* @ref CBibleKeyChooser
* @param info the @ref CModuleInfo to be represented by the KeyChooser
* @param key if not NULL, the @ref CKey the KeyChooser should be set to
* @param parent the parent of the widget to create
*/
- static CKeyChooser* createInstance(QList<CSwordModuleInfo*> modules, CSwordKey *key, QWidget *parent);
+ static CKeyChooser *createInstance(
+ const QList<const CSwordModuleInfo*> &modules,
+ BTHistory *history, CSwordKey *key, QWidget *parent);
public slots:
/**
- * sets the @ref CKey
- * @param key the key which the widget should be set to
+ Sets the CKey
+ \param key the key which the widget should be set to.
*/
virtual void setKey(CSwordKey* key) = 0;
+
/**
- * sets the @ref CKey
- * @param key the key which the widget should be set to
+ Updates the CKey.
+ \param key the key which the widget should be set to.
*/
- virtual void updateKey(CSwordKey* key) = 0;
+ virtual void updateKey(CSwordKey *key) = 0;
+
/**
- * gets the current @ref CKey
- *
- * @return the current @ref CKey
+ \returns the current CKey.
*/
- virtual CSwordKey* key() = 0;
+ virtual CSwordKey *key() = 0;
+
/**
- * Sets the module of this keychooser and refreshes the comboboxes
+ Sets the module of this keychooser and refreshes the comboboxes
*/
- virtual void setModules( const QList<CSwordModuleInfo*>& modules, const bool refresh = true ) = 0;
+ virtual void setModules(const QList<const CSwordModuleInfo*> &modules,
+ bool refresh = true) = 0;
+
/**
- * Freshes the content of the different key chooser parts.
+ Refreshes the content of the different key chooser parts.
*/
virtual void refreshContent() = 0;
/**
- * Returns the history object of this keychooser.
+ \returns the history object of this keychooser.
*/
- BTHistory* history();
+ inline BTHistory *history() const { return m_history; }
signals:
@@ -86,21 +90,22 @@ class CKeyChooser : public QWidget {
protected:
+ CKeyChooser(const QList<const CSwordModuleInfo*> &info,
+ BTHistory *history, CSwordKey *key = 0,
+ QWidget *parent = 0);
+
+ virtual inline ~CKeyChooser() {}
+
/**
- * the constructor - DO NOT USE! -- use @ref #createInstance instead!
- */
- CKeyChooser(QList<CSwordModuleInfo*> info, CSwordKey *key = 0, QWidget *parent = 0);
- virtual ~CKeyChooser();
- /**
- * Set the appropriate font do display the modules
+ Resets the appropriate font to for the modules.
*/
virtual void adjustFont() = 0;
protected slots:
- virtual void setKey(QString& newKey) = 0;
+ virtual void setKey(QString &newKey) = 0;
private:
- BTHistory* m_history;
+ BTHistory *m_history;
};