~vcs-imports/bibletime/trunk

« back to all changes in this revision

Viewing changes to bibletime/frontend/keychooser/clexiconkeychooser.h

  • Committer: mgruner
  • Date: 2007-05-08 15:51:07 UTC
  • Revision ID: vcs-imports@canonical.com-20070508155107-0rj7jdmm5ivf8685
-imported source and data files to new svn module
-this is where KDE4-based development will take place

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*********
 
2
*
 
3
* This file is part of BibleTime's source code, http://www.bibletime.info/.
 
4
*
 
5
* Copyright 1999-2006 by the BibleTime developers.
 
6
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
 
7
*
 
8
**********/
 
9
 
 
10
 
 
11
 
 
12
#ifndef CLEXICONKEYCHOOSER_H
 
13
#define CLEXICONKEYCHOOSER_H
 
14
 
 
15
#include <qwidget.h>
 
16
#include "ckeychooser.h"
 
17
#include "backend/cswordldkey.h"
 
18
#include "backend/cswordmoduleinfo.h"
 
19
#include "backend/cswordlexiconmoduleinfo.h"
 
20
 
 
21
class CKeyChooserWidget;
 
22
class QHBoxLayout;
 
23
 
 
24
/**
 
25
 * This class implements the KeyChooser for lexicons
 
26
 *
 
27
 * it inhertits @ref CKeyChooser
 
28
 * it uses 1 @ref CKeyChooserWidget to represent the lexicon keys
 
29
 *
 
30
  * @author The BibleTime team
 
31
  */
 
32
class CLexiconKeyChooser : public CKeyChooser  {
 
33
        Q_OBJECT
 
34
public:
 
35
        /**
 
36
        * The constructor
 
37
        *
 
38
        * you should not need to use this, use @ref CKeyChooser::createInstance instead
 
39
        */
 
40
        CLexiconKeyChooser(ListCSwordModuleInfo modules, CSwordKey *key=0, QWidget *parent=0, const char *name=0);
 
41
 
 
42
public slots:
 
43
        /**
 
44
        * see @ref CKeyChooser::getKey
 
45
        * @return Return the key object we use.
 
46
        */
 
47
        virtual CSwordKey* const key();
 
48
        /**
 
49
        * see @ref CKeyChooser::setKey
 
50
        */
 
51
        virtual void setKey(CSwordKey* key);
 
52
        /**
 
53
        * used to react to changes in the @ref CKeyChooserWidget
 
54
        *
 
55
        * @param index not used
 
56
        **/
 
57
        virtual void activated(int index);
 
58
        /**
 
59
        * Reimplementatuion.
 
60
        */
 
61
        virtual void refreshContent();
 
62
        /**
 
63
        * Sets the module and refreshes the combo boxes of this keychooser.
 
64
        */
 
65
        virtual void setModules( const ListCSwordModuleInfo& modules, const bool refresh = true );
 
66
 
 
67
protected:
 
68
        CKeyChooserWidget *m_widget;
 
69
        CSwordLDKey* m_key;
 
70
        QPtrList<CSwordLexiconModuleInfo> m_modules;
 
71
        QHBoxLayout *m_layout;
 
72
 
 
73
        virtual void adjustFont();
 
74
 
 
75
public slots: // Public slots
 
76
        virtual void updateKey(CSwordKey* key);
 
77
};
 
78
 
 
79
#endif