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

« back to all changes in this revision

Viewing changes to src/frontend/displaywindow/btdisplaysettingsbutton.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 BTDISPLAYSETTINGSBUTTON_H
 
11
#define BTDISPLAYSETTINGSBUTTON_H
 
12
 
 
13
#include <QToolButton>
 
14
 
 
15
#include "backend/managers/cswordbackend.h"
 
16
 
 
17
 
 
18
class CSwordModuleInfo;
 
19
class QMenu;
 
20
 
 
21
/** This class manages the display options of the selected modules.
 
22
  * @author The BibleTime team
 
23
  */
 
24
class BtDisplaySettingsButton: public QToolButton {
 
25
        Q_OBJECT
 
26
 
 
27
    public:
 
28
        BtDisplaySettingsButton(QWidget *parent = 0);
 
29
 
 
30
        void setDisplayOptions(const CSwordBackend::DisplayOptions &displaySettings,
 
31
                               bool repopulate = true);
 
32
        void setFilterOptions(const CSwordBackend::FilterOptions &moduleSettings,
 
33
                              bool repopulate = true);
 
34
        void setModules(const QList<CSwordModuleInfo*> &modules);
 
35
 
 
36
    signals:
 
37
        void sigFilterOptionsChanged(CSwordBackend::FilterOptions filterOptions);
 
38
        void sigDisplayOptionsChanged(CSwordBackend::DisplayOptions displayOptions);
 
39
        void sigChanged(void);
 
40
 
 
41
    protected slots:
 
42
        void slotOptionToggled(QAction *action);
 
43
 
 
44
    protected:
 
45
        void initMenu();
 
46
        void retranslateUi();
 
47
        void retranslateToolTip();
 
48
        void repopulateMenu();
 
49
 
 
50
        bool isOptionAvailable(const CSwordModuleInfo::FilterTypes option);
 
51
        void addMenuEntry(QAction *action, bool checked);
 
52
 
 
53
    private:
 
54
        CSwordBackend::FilterOptions  m_filterOptions;
 
55
        CSwordBackend::DisplayOptions m_displayOptions;
 
56
        QList<CSwordModuleInfo*> m_modules;
 
57
 
 
58
        QMenu *m_popup;
 
59
        QAction *m_lineBreakAction;
 
60
        QAction *m_verseNumbersAction;
 
61
        QAction *m_headingsAction;
 
62
        QAction *m_redWordsAction;
 
63
        QAction *m_hebrewPointsAction;
 
64
        QAction *m_hebrewCantillationAction;
 
65
        QAction *m_greekAccentsAction;
 
66
        QAction *m_variantAction;
 
67
        QAction *m_scriptureReferencesAction;
 
68
        QAction *m_morphSegmentationAction;
 
69
};
 
70
 
 
71
#endif