summaryrefslogtreecommitdiff
path: root/src/frontend/bookshelfmanager/btconfigdialog.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/frontend/bookshelfmanager/btconfigdialog.h')
-rw-r--r--src/frontend/bookshelfmanager/btconfigdialog.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/src/frontend/bookshelfmanager/btconfigdialog.h b/src/frontend/bookshelfmanager/btconfigdialog.h
index 547cb4e..dce22ab 100644
--- a/src/frontend/bookshelfmanager/btconfigdialog.h
+++ b/src/frontend/bookshelfmanager/btconfigdialog.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.
*
**********/
@@ -17,10 +17,11 @@
class BtConfigPage;
-class QListWidgetItem;
+class QDialogButtonBox;
+class QLabel;
class QListWidget;
+class QListWidgetItem;
class QStackedWidget;
-class QDialogButtonBox;
class QVBoxLayout;
/**
@@ -34,7 +35,7 @@ class QVBoxLayout;
class BtConfigDialog : public QDialog {
Q_OBJECT
public:
- BtConfigDialog(QWidget* parent);
+ BtConfigDialog(QWidget *parent = 0);
virtual ~BtConfigDialog();
/** Adds a BtConfigPage to the paged widget stack. The new page will be the current page.*/
@@ -42,9 +43,6 @@ class BtConfigDialog : public QDialog {
/** Adds a button box to the lower edge of the dialog. */
void addButtonBox(QDialogButtonBox* buttonBox);
- /** Returns the currently selected page. */
- BtConfigPage* currentPage();
-
public slots:
/** Changes the current page using the given index number. */
void slotChangePage(int newIndex);
@@ -64,24 +62,29 @@ class BtConfigDialog : public QDialog {
*/
class BtConfigPage : public QWidget {
Q_OBJECT
+ friend class BtConfigDialog;
+
public:
- BtConfigPage();
+ /**
+ Constructs a configuration dialog base, with QVBoxLayout as layout() and a header
+ label as the first widget in this layout.
+ \param[in] parent The parent widget.
+ */
+ BtConfigPage(QWidget *parent = 0);
virtual ~BtConfigPage();
/** Implement these to return the correct values.
* For example: header(){return tr("General");}
*/
- virtual QString iconName() = 0;
- virtual QString label() = 0;
- virtual QString header() = 0;
- BtConfigDialog* parentDialog() {
+ virtual const QIcon &icon() const = 0;
+ virtual QString header() const = 0;
+
+ inline BtConfigDialog *parentDialog() const {
return m_parentDialog;
}
private:
- friend class BtConfigDialog;
- BtConfigDialog* m_parentDialog;
-
+ BtConfigDialog *m_parentDialog;
};