~ubuntu-branches/ubuntu/trusty/bibletime/trusty

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Marsden
  • Date: 2009-11-18 17:30:00 UTC
  • mfrom: (1.3.4 upstream) (5.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20091118173000-endkhjz5qai88tvr
Tags: 2.4-1
* New upstream version 2.4
* debian/control: 
  - Replace incorrect bibletime-data Depends on lib4qt-gui
    with bibletime Depends on libqtgui4 (>= 4.4.0). (Closes: #556209).
  - Add Build-depends: on zlib1g-dev and libcurl4-gnutls-dev 
    (Closes: #556805).

Show diffs side-by-side

added added

removed removed

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