3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
5
* Copyright 1999-2006 by the BibleTime developers.
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
12
#ifndef CMODULECHOOSERBUTTON_H
13
#define CMODULECHOOSERBUTTON_H
16
#include "backend/cswordmoduleinfo.h"
17
#include "util/cpointers.h"
21
#include <qtoolbutton.h>
24
#include <ktoolbarbutton.h>
25
#include <kpopupmenu.h>
28
class CModuleChooserBar;
30
/** The CModuleChooserButton displays a list of submenus sorted by language which contain the possible modules
31
* which can be displayed together with the first one.
32
* @author The BibleTime team
34
class CModuleChooserButton : public KToolBarButton, public CPointers {
37
CModuleChooserButton(CSwordModuleInfo* useModule, CSwordModuleInfo::ModuleType type, const int id, CModuleChooserBar *parent, const char *name = 0 );
38
~CModuleChooserButton();
40
CSwordModuleInfo* module();
42
* Returns the id used for this button.
45
void updateMenuItems();
47
protected: // Protected methods
52
* Returns the icon used for the current status.
54
const QString iconName();
60
CSwordModuleInfo::ModuleType m_moduleType;
61
CSwordModuleInfo* m_module;
64
QPtrList<KPopupMenu> m_submenus;
66
CModuleChooserBar* m_moduleChooserBar;
70
void moduleChosen(int ID );
73
void sigRemoveButton(const int ID);