~ubuntu-branches/ubuntu/jaunty/bibletime/jaunty

« back to all changes in this revision

Viewing changes to bibletime/frontend/displaywindow/cmodulechooserbar.h

  • Committer: Bazaar Package Importer
  • Author(s): Ralph Janke
  • Date: 2008-05-10 15:18:16 UTC
  • mfrom: (1.1.6 upstream) (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080510151816-bqp8y1to705zd0fm
Tags: 1.6.5.1-1
* New upstream version (Closes: #441161, #271502)
* fixes for new autotools and gcc 4.3 (Closes: #407291)
* added poxml to Build-Depends
* No DFSG necessary anymore since biblestudy howto has 
  now Commons Licence 
* Added libclucene-dev to dev-depends (Closes: #436677)

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 CMODULECHOOSERBAR_H
 
13
#define CMODULECHOOSERBAR_H
 
14
 
 
15
//BibleTime includes
 
16
#include "cmodulechooserbutton.h"
 
17
 
 
18
#include "backend/cswordmoduleinfo.h"
 
19
 
 
20
#include "util/cpointers.h"
 
21
 
 
22
//Qt includes
 
23
#include <qwidget.h>
 
24
#include <qhbox.h>
 
25
 
 
26
//KDE includes
 
27
#include <ktoolbar.h>
 
28
 
 
29
/**
 
30
  * @author The BibleTime team
 
31
  */
 
32
class CModuleChooserBar : public KToolBar  {
 
33
        Q_OBJECT
 
34
public:
 
35
        /**
 
36
        * Default constructor
 
37
        */
 
38
        CModuleChooserBar(ListCSwordModuleInfo useModules, CSwordModuleInfo::ModuleType type,  QWidget *parent=0, const char *name=0);
 
39
        /**
 
40
        * Returns a list of selected modules.
 
41
        */
 
42
        ListCSwordModuleInfo getModuleList();
 
43
        /**
 
44
        * Sets the number of the maximum count of buttons.
 
45
        */
 
46
        void setButtonLimit( const int limit);
 
47
        /**
 
48
        * Sets the modules which are chosen in this module chooser bar.
 
49
        */
 
50
        void setModules( ListCSwordModuleInfo modules );
 
51
 
 
52
protected:
 
53
        /**
 
54
         * Adds a button to the toolbar
 
55
         */
 
56
        CModuleChooserButton* const addButton( CSwordModuleInfo* const module );
 
57
 
 
58
protected slots: // Protected slots
 
59
        /* Add a button
 
60
        * This slot calls the addButton function above to add a button.
 
61
        */
 
62
        void addButton();
 
63
        /**
 
64
        * Removes a button from the toolbar
 
65
        */
 
66
        void removeButton( const int ID );
 
67
        void updateMenuItems();
 
68
 
 
69
private:
 
70
        CSwordModuleInfo::ModuleType m_moduleType;
 
71
        int m_idCounter;
 
72
        int m_buttonLimit;
 
73
        QPtrList<CModuleChooserButton> m_buttonList;
 
74
 
 
75
signals: // Signals
 
76
        void sigChanged();
 
77
};
 
78
 
 
79
#endif