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 CBOOKKEYCHOOSER_H
13
#define CBOOKKEYCHOOSER_H
16
#include "ckeychooser.h"
17
#include "ckeychooserwidget.h"
26
#include <qstringlist.h>
29
class CSwordBookModuleInfo;
38
/** The keychooser implementation for books.
39
* @author The BibleTime team
41
class CBookKeyChooser : public CKeyChooser {
44
CBookKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, QWidget *parent=0, const char *name=0);
47
* Refreshes the content.
49
virtual void refreshContent();
51
* Sets another module to this keychooser
53
virtual void setModules(const ListCSwordModuleInfo& modules, const bool refresh = false);
55
* Returns the key of this kechooser.
57
virtual CSwordKey* const key();
59
* Sets a new key to this keychooser
61
virtual void setKey(CSwordKey*);
63
* Sets a new key to this keychooser
65
void setKey(CSwordKey*, const bool emitSignal);
68
public slots: // Public slots
70
* Updates the keychoosers for the given key but emit no signal.
72
void updateKey(CSwordKey*);
74
protected: // Protected methods
76
* Fills the combo given by depth with the items from the key having depth "depth".
77
* The parent sibling is given by key.
79
void setupCombo(const QString key, const int depth, const int currentItem);
80
/** No descriptions */
81
virtual void adjustFont();
85
* A keychooser changed. Update and emit a signal if necessary.
87
void keyChooserChanged(int);
88
//is called when a keychooser widget wants to jump to the next/previous key
90
// void previousEntry();
93
QPtrList<CKeyChooserWidget> m_chooserWidgets;
94
QPtrList<CSwordBookModuleInfo> m_modules;
96
QHBoxLayout* m_layout;