~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: 2010-01-10 22:21:36 UTC
  • mfrom: (1.3.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100110222136-905hza76230hperg
Tags: 2.5-1
New upstream version 2.5 (Closes: #564551).

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-2008 by the BibleTime developers.
6
 
* The BibleTime source code is licensed under the GNU General Public License version 2.0.
7
 
*
8
 
**********/
9
 
 
10
 
#ifndef CMODULECHOOSERBAR_H
11
 
#define CMODULECHOOSERBAR_H
12
 
 
13
 
#include <QToolBar>
14
 
 
15
 
#include <QList>
16
 
#include "backend/drivers/cswordmoduleinfo.h"
17
 
#include "util/cpointers.h"
18
 
 
19
 
 
20
 
class CModuleChooserButton;
21
 
class QWidget;
22
 
 
23
 
/**
24
 
  * @author The BibleTime team
25
 
  */
26
 
class CModuleChooserBar : public QToolBar  {
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;
72
 
 
73
 
};
74
 
 
75
 
#endif