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 *
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
***************************************************************************/
21
21
#ifndef SHORTCUTSSETTINGSPAGE_H
30
30
class ActionCollection;
31
31
class ShortcutsModel;
33
class ShortcutsFilter : public QSortFilterProxyModel {
33
class ShortcutsFilter : public QSortFilterProxyModel
36
ShortcutsFilter(QObject *parent = 0);
37
ShortcutsFilter(QObject *parent = 0);
39
void setFilterString(const QString &filterString);
40
void setFilterString(const QString &filterString);
42
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
43
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const;
45
QString _filterString;
46
QString _filterString;
48
class ShortcutsSettingsPage : public SettingsPage {
50
class ShortcutsSettingsPage : public SettingsPage
51
ShortcutsSettingsPage(const QHash<QString, ActionCollection *> &actionCollections, QWidget *parent = 0);
54
ShortcutsSettingsPage(const QHash<QString, ActionCollection *> &actionCollections, QWidget *parent = 0);
53
inline bool hasDefaults() const { return true; }
56
inline bool hasDefaults() const { return true; }
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();
67
Ui::ShortcutsSettingsPage ui;
68
ShortcutsModel *_shortcutsModel;
69
ShortcutsFilter *_shortcutsFilter;
70
Ui::ShortcutsSettingsPage ui;
71
ShortcutsModel *_shortcutsModel;
72
ShortcutsFilter *_shortcutsFilter;
72
76
#endif // SHORTCUTSSETTINGSPAGE_H