diff options
author | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:19 -0400 |
---|---|---|
committer | Roberto C. Sanchez <roberto@connexer.com> | 2014-10-21 22:48:19 -0400 |
commit | 1af3b165c9377702ca62a64112bc089a6f575c30 (patch) | |
tree | 4df9cca5543b2cab5ca56dbb1214d7d3b1f291e3 /src/frontend/displaywindow/cmodulechooserbar.h | |
parent | 5b5fd0dce407556f98ed8edee89dc830bf1437b1 (diff) |
Imported Upstream version 2.0~beta2
Diffstat (limited to 'src/frontend/displaywindow/cmodulechooserbar.h')
-rw-r--r-- | src/frontend/displaywindow/cmodulechooserbar.h | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/src/frontend/displaywindow/cmodulechooserbar.h b/src/frontend/displaywindow/cmodulechooserbar.h new file mode 100644 index 0000000..d21fcb9 --- /dev/null +++ b/src/frontend/displaywindow/cmodulechooserbar.h @@ -0,0 +1,77 @@ +/********* +* +* This file is part of BibleTime's source code, http://www.bibletime.info/. +* +* Copyright 1999-2008 by the BibleTime developers. +* The BibleTime source code is licensed under the GNU General Public License version 2.0. +* +**********/ + +#ifndef CMODULECHOOSERBAR_H +#define CMODULECHOOSERBAR_H + +//BibleTime includes +#include "backend/drivers/cswordmoduleinfo.h" + +#include "util/cpointers.h" + +//Qt includes +#include <QList> +#include <QToolBar> + +class CModuleChooserButton; +class QWidget; + +/** + * @author The BibleTime team + */ +class CModuleChooserBar : public QToolBar { + Q_OBJECT +public: + /** + * Default constructor + */ + CModuleChooserBar(QList<CSwordModuleInfo*> useModules, CSwordModuleInfo::ModuleType type, QWidget *parent=0); + /** + * Returns a list of selected modules. + */ + QList<CSwordModuleInfo*> getModuleList(); + /** + * Sets the number of the maximum count of buttons. + */ + void setButtonLimit( const int limit); + /** + * Sets the modules which are chosen in this module chooser bar. + */ + void setModules( QList<CSwordModuleInfo*> modules ); + +signals: + void sigChanged(); + +protected: + /** + * Adds a button to the toolbar + */ + CModuleChooserButton* addButton( CSwordModuleInfo* const module ); + +protected slots: // Protected slots + /* + * This slot calls the addButton function above to add a button. + */ + void addButton(); + /** + * Removes a button from the toolbar + */ + void removeButton( const int ID ); + /** */ + void updateMenuItems(); + +private: + CSwordModuleInfo::ModuleType m_moduleType; + int m_idCounter; + int m_buttonLimit; + QList<CModuleChooserButton*> m_buttonList; + +}; + +#endif |