diff options
Diffstat (limited to 'src/frontend/bookshelfmanager/installpage/btinstallpage.h')
-rw-r--r-- | src/frontend/bookshelfmanager/installpage/btinstallpage.h | 65 |
1 files changed, 49 insertions, 16 deletions
diff --git a/src/frontend/bookshelfmanager/installpage/btinstallpage.h b/src/frontend/bookshelfmanager/installpage/btinstallpage.h index fde9919..88d1f92 100644 --- a/src/frontend/bookshelfmanager/installpage/btinstallpage.h +++ b/src/frontend/bookshelfmanager/installpage/btinstallpage.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. * **********/ @@ -12,29 +12,34 @@ #include "frontend/bookshelfmanager/btconfigdialog.h" -#include <QString> +#include "backend/bookshelfmodel/btbookshelftreemodel.h" -// Sword includes: -#include <installmgr.h> +namespace sword { +class InstallSource; +} -class BtSourceWidget; +class BtInstallPageWorksWidget; class QComboBox; +class QGroupBox; class QPushButton; +class QStackedLayout; class QToolButton; /** * The Install page includes module path chooser, source/module handler and install button. */ -class BtInstallPage : public BtConfigPage { +class BtInstallPage: public BtConfigPage { Q_OBJECT + public: - BtInstallPage(); + BtInstallPage(QWidget *parent = 0); + + /** Reimplemented from BtConfigPage. */ + virtual const QIcon &icon() const; - // reimplemented from btinstallpage - QString iconName(); - QString label(); - QString header(); + /** Reimplemented from BtConfigPage. */ + virtual QString header() const; void setInstallEnabled(bool b); @@ -47,18 +52,46 @@ class BtInstallPage : public BtConfigPage { void initView(); void initConnections(); void initPathCombo(); + void initSourcesCombo(); + + void activateSource(const sword::InstallSource &src); + void retranslateInstallGroupBox(); private slots: + void slotGroupingOrderChanged(const BtBookshelfTreeModel::Grouping &g); + void slotHeaderChanged(); + void slotInstall(); void slotPathChanged(const QString& pathText); void slotEditPaths(); + void slotSourceAdd(); + void slotSourceDelete(); + void slotSourceIndexChanged(int index); + void slotSelectedModulesChanged(); private: + BtBookshelfTreeModel::Grouping m_groupingOrder; + QByteArray m_headerState; + + QMap<QString, BtInstallPageWorksWidget*> m_sourceMap; + + QLabel *m_warningLabel; + + QGroupBox *m_sourceGroupBox; + QComboBox *m_sourceComboBox; + QPushButton *m_sourceAddButton; + QPushButton *m_sourceDeleteButton; + + QGroupBox *m_worksGroupBox; + QStackedLayout *m_worksLayout; + + QGroupBox *m_installGroupBox; + QLabel *m_pathLabel; + QComboBox *m_pathCombo; + QToolButton *m_configurePathButton; + QPushButton *m_installButton; - QComboBox* m_pathCombo; - //QPushButton* m_configurePathButton; - QToolButton* m_configurePathButton; - BtSourceWidget* m_sourceWidget; - QPushButton* m_installButton; + unsigned m_modulesSelected; + unsigned m_modulesSelectedSources; }; #endif |