diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-10 05:14:00 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-09-10 05:14:00 +0000 |
commit | fa949b6b7fa553547f26305d4227e8baa0091c1f (patch) | |
tree | 9199255f7d3e0f276f6f53000f13fb0081f3c4c5 /bibletime/frontend/searchdialog/cmodulechooser.h | |
download | bibletime-fa949b6b7fa553547f26305d4227e8baa0091c1f.tar.gz bibletime-fa949b6b7fa553547f26305d4227e8baa0091c1f.zip |
Added initial Trinity version of BibleTime
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/bibletime@1173688 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'bibletime/frontend/searchdialog/cmodulechooser.h')
-rw-r--r-- | bibletime/frontend/searchdialog/cmodulechooser.h | 117 |
1 files changed, 117 insertions, 0 deletions
diff --git a/bibletime/frontend/searchdialog/cmodulechooser.h b/bibletime/frontend/searchdialog/cmodulechooser.h new file mode 100644 index 0000000..b40010e --- /dev/null +++ b/bibletime/frontend/searchdialog/cmodulechooser.h @@ -0,0 +1,117 @@ +/********* +* +* This file is part of BibleTime's source code, http://www.bibletime.info/. +* +* Copyright 1999-2006 by the BibleTime developers. +* The BibleTime source code is licensed under the GNU General Public License version 2.0. +* +**********/ + + + +#ifndef CMODULECHOOSER_H +#define CMODULECHOOSER_H + +//BibleTime includes + +#include "backend/cswordmoduleinfo.h" +#include "backend/cswordbackend.h" +#include "backend/cswordmodulesearch.h" + +#include "util/cpointers.h" + +//Sword includes + + +//Qt includes +#include <qwidget.h> +#include <qstring.h> +#include <qcanvas.h> +#include <qdict.h> +#include <qtooltip.h> + +//KDE includes +#include <kdialog.h> +#include <kdialogbase.h> +#include <klistview.h> + +namespace Search { + namespace Options { + +class CModuleChooser : public KListView, public CPointers { + Q_OBJECT +public: + class ModuleCheckBoxItem : virtual public QCheckListItem { + public: + ModuleCheckBoxItem(QListViewItem* item, CSwordModuleInfo* module); + ~ModuleCheckBoxItem(); + /** + * Returns the used module. + */ + CSwordModuleInfo* const module() const; + private: + CSwordModuleInfo* m_module; + }; + + CModuleChooser(QWidget* parent); + ~CModuleChooser(); + /** + * Sets the list of modules and updates the state of the checkbox items. + */ + void setModules( ListCSwordModuleInfo modules ); + /** + * Returns a list of selected modules. + */ + ListCSwordModuleInfo modules(); + +public slots: + /** + * Reimplemented to open the folders which contain checked module items + */ + virtual void show(); + + +protected: // Protected methods + /** + * Initializes this widget and the childs of it. + */ + void initView(); + /** + * Initializes the tree of this widget. + */ + void initTree(); +}; + +class CModuleChooserDialog : public KDialogBase { + Q_OBJECT +public: + CModuleChooserDialog(QWidget* parentDialog, ListCSwordModuleInfo modules); + ~CModuleChooserDialog(); + +signals: + void modulesChanged(ListCSwordModuleInfo modules); + +protected: // Protected methods + /** + * Initializes the view of this dialog + */ + void initView(); + /** + * Initializes the connections of this dialog. + */ + void initConnections(); + +protected slots: // Protected slots + /** + * Reimplementation to handle the modules. + */ + virtual void slotOk(); + +private: + CModuleChooser* m_moduleChooser; +}; + + } //end of namespace Search.Options +} //end of namespace Search + +#endif |