~ubuntu-branches/ubuntu/vivid/quassel/vivid-updates

« back to all changes in this revision

Viewing changes to src/qtui/settingspages/shortcutssettingspage.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman
  • Date: 2013-03-06 15:07:41 UTC
  • mfrom: (1.1.49)
  • Revision ID: package-import@ubuntu.com-20130306150741-pys1igw1g8uhja38
Tags: 0.9~beta1-0ubuntu1
* New upstream beta release
  - Remove debian/patches/0001-Support-intermediate-CA-certificates.patch,
    incorporated upstream
  - Remove 0002-Allow-the-core-to-use-expired-certificates.patch,
    incorporated upstream
  - Update kubuntu_02_enable_message_indicator.diff for 0.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/***************************************************************************
2
 
 *   Copyright (C) 2010 by the Quassel Project                             *
 
2
 *   Copyright (C) 2005-2013 by the Quassel Project                        *
3
3
 *   devel@quassel-irc.org                                                 *
4
4
 *                                                                         *
5
5
 *   This program is free software; you can redistribute it and/or modify  *
15
15
 *   You should have received a copy of the GNU General Public License     *
16
16
 *   along with this program; if not, write to the                         *
17
17
 *   Free Software Foundation, Inc.,                                       *
18
 
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 
18
 *   51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.         *
19
19
 ***************************************************************************/
20
20
 
21
21
#ifndef SHORTCUTSSETTINGSPAGE_H
30
30
class ActionCollection;
31
31
class ShortcutsModel;
32
32
 
33
 
class ShortcutsFilter : public QSortFilterProxyModel {
34
 
  Q_OBJECT
 
33
class ShortcutsFilter : public QSortFilterProxyModel
 
34
{
 
35
    Q_OBJECT
35
36
public:
36
 
  ShortcutsFilter(QObject *parent = 0);
 
37
    ShortcutsFilter(QObject *parent = 0);
37
38
 
38
39
public slots:
39
 
  void setFilterString(const QString &filterString);
 
40
    void setFilterString(const QString &filterString);
40
41
 
41
42
protected:
42
 
  virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
 
43
    virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
43
44
 
44
45
private:
45
 
  QString _filterString;
 
46
    QString _filterString;
46
47
};
47
48
 
48
 
class ShortcutsSettingsPage : public SettingsPage {
49
 
  Q_OBJECT
 
49
 
 
50
class ShortcutsSettingsPage : public SettingsPage
 
51
{
 
52
    Q_OBJECT
50
53
public:
51
 
  ShortcutsSettingsPage(const QHash<QString, ActionCollection *> &actionCollections, QWidget *parent = 0);
 
54
    ShortcutsSettingsPage(const QHash<QString, ActionCollection *> &actionCollections, QWidget *parent = 0);
52
55
 
53
 
  inline bool hasDefaults() const { return true; }
 
56
    inline bool hasDefaults() const { return true; }
54
57
 
55
58
public slots:
56
 
  void save();
57
 
  void load();
58
 
  void defaults();
 
59
    void save();
 
60
    void load();
 
61
    void defaults();
59
62
 
60
63
private slots:
61
 
  void on_searchEdit_textChanged(const QString &text);
62
 
  void keySequenceChanged(const QKeySequence &seq, const QModelIndex &conflicting);
63
 
  void setWidgetStates();
64
 
  void toggledCustomOrDefault();
 
64
    void on_searchEdit_textChanged(const QString &text);
 
65
    void keySequenceChanged(const QKeySequence &seq, const QModelIndex &conflicting);
 
66
    void setWidgetStates();
 
67
    void toggledCustomOrDefault();
65
68
 
66
69
private:
67
 
  Ui::ShortcutsSettingsPage ui;
68
 
  ShortcutsModel *_shortcutsModel;
69
 
  ShortcutsFilter *_shortcutsFilter;
 
70
    Ui::ShortcutsSettingsPage ui;
 
71
    ShortcutsModel *_shortcutsModel;
 
72
    ShortcutsFilter *_shortcutsFilter;
70
73
};
71
74
 
 
75
 
72
76
#endif // SHORTCUTSSETTINGSPAGE_H