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

« back to all changes in this revision

Viewing changes to src/frontend/settingsdialogs/cacceleratorsettings.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 CACCELERATORSETTINGS_H
11
11
#define CACCELERATORSETTINGS_H
12
12
 
13
 
#include "btshortcutseditor.h"
14
 
 
 
13
#include "frontend/bookshelfmanager/btconfigdialog.h"
15
14
#include "util/cpointers.h"
16
 
//#include "backend/config/cbtconfig.h"
17
 
#include "frontend/bookshelfmanager/btconfigdialog.h"
18
15
 
 
16
#include <QPointer>
19
17
#include <QWidget>
20
 
#include <QPointer>
21
 
 
 
18
#include "frontend/settingsdialogs/btshortcutseditor.h"
 
19
 
 
20
 
 
21
class BtActionCollection;
 
22
class BtShortcutsEditor;
22
23
class QComboBox;
23
24
class QStackedWidget;
24
 
class BtActionCollection;
25
 
class BtShortcutsEditor;
26
25
 
27
26
/**
28
 
        @author The BibleTime team <info@bibletime.info>
 
27
    @author The BibleTime team <info@bibletime.info>
29
28
*/
30
 
class CAcceleratorSettingsPage : public BtConfigPage, CPointers
31
 
{
32
 
        Q_OBJECT
33
 
 
34
 
public:
35
 
    CAcceleratorSettingsPage(QWidget *parent);
36
 
    ~CAcceleratorSettingsPage();
37
 
        void save();
38
 
        QString iconName();
39
 
        QString label();
40
 
        QString header();
41
 
 
42
 
protected slots:
43
 
 
44
 
        void slotKeyChooserTypeChanged(const QString& title);
45
 
 
46
 
        // complete the keyChangeRequest
47
 
        void completeKeyChangeRequest(BtShortcutsEditor* shortcutsEditor, const QString& keys);
48
 
 
49
 
private:
50
 
        struct WindowType {
51
 
                QPointer<BtShortcutsEditor> keyChooser;
52
 
                BtActionCollection* actionCollection;
53
 
                QString title;
54
 
 
55
 
                WindowType() {
56
 
                        keyChooser = 0;
57
 
                        actionCollection = 0;
58
 
                };
59
 
                WindowType(const QString& newTitle) {
60
 
                        title = newTitle;
61
 
                        keyChooser = 0;
62
 
                        actionCollection = 0;
63
 
                }
64
 
        };
65
 
 
66
 
        void clearConflictsWithKeys(const QString& keys, const QList<BtShortcutsEditor*> list);
67
 
        QString findConflictsWithKeys(const QString& keys, const QList<BtShortcutsEditor*> list);
68
 
        QList<BtShortcutsEditor*> getShortcutsEditorListForGroup(BtShortcutsEditor* currentEditor);
69
 
        QString getTitleForEditor(BtShortcutsEditor* editor);
70
 
 
71
 
        WindowType m_application;
72
 
        WindowType m_general;
73
 
        WindowType m_bible;
74
 
        WindowType m_commentary;
75
 
        WindowType m_lexicon;
76
 
        WindowType m_book;
77
 
 
78
 
        QComboBox* m_typeChooser;
79
 
        QStackedWidget* m_keyChooserStack;
 
29
class CAcceleratorSettingsPage : public BtConfigPage, CPointers {
 
30
        Q_OBJECT
 
31
    public:
 
32
        CAcceleratorSettingsPage(QWidget *parent);
 
33
        ~CAcceleratorSettingsPage();
 
34
        void save();
 
35
        QString iconName();
 
36
        QString label();
 
37
        QString header();
 
38
 
 
39
    protected slots:
 
40
 
 
41
        void slotKeyChooserTypeChanged(const QString& title);
 
42
 
 
43
        // complete the keyChangeRequest
 
44
        void completeKeyChangeRequest(BtShortcutsEditor* shortcutsEditor, const QString& keys);
 
45
 
 
46
    private:
 
47
        struct WindowType {
 
48
            QPointer<BtShortcutsEditor> keyChooser;
 
49
            BtActionCollection* actionCollection;
 
50
            QString title;
 
51
 
 
52
            WindowType() {
 
53
                keyChooser = 0;
 
54
                actionCollection = 0;
 
55
            };
 
56
            WindowType(const QString& newTitle) {
 
57
                title = newTitle;
 
58
                keyChooser = 0;
 
59
                actionCollection = 0;
 
60
            }
 
61
        };
 
62
 
 
63
        void clearConflictsWithKeys(const QString& keys, const QList<BtShortcutsEditor*> list);
 
64
        QString findConflictsWithKeys(const QString& keys, const QList<BtShortcutsEditor*> list);
 
65
        QList<BtShortcutsEditor*> getShortcutsEditorListForGroup(BtShortcutsEditor* currentEditor);
 
66
        QString getTitleForEditor(BtShortcutsEditor* editor);
 
67
 
 
68
        WindowType m_application;
 
69
        WindowType m_general;
 
70
        WindowType m_bible;
 
71
        WindowType m_commentary;
 
72
        WindowType m_lexicon;
 
73
        WindowType m_book;
 
74
 
 
75
        QComboBox* m_typeChooser;
 
76
        QStackedWidget* m_keyChooserStack;
80
77
 
81
78
};
82
79