comparison widgets/KeyReference.h @ 740:a31c8ee2e17e tonioni

Allow registering an alternative shortcut using QKeySequence so as to get the right native string
author Chris Cannam
date Thu, 06 Mar 2014 14:27:59 +0000
parents 5f3f5c1e23e8
children 05d614f6e46d
comparison
equal deleted inserted replaced
739:dfe543438d52 740:a31c8ee2e17e
18 18
19 #include <QObject> 19 #include <QObject>
20 #include <QString> 20 #include <QString>
21 #include <vector> 21 #include <vector>
22 #include <map> 22 #include <map>
23 #include <QKeySequence>
23 24
24 class QAction; 25 class QAction;
25 class QTextEdit; 26 class QTextEdit;
26 class QDialog; 27 class QDialog;
27 class QAbstractButton; 28 class QAbstractButton;
36 37
37 void setCategory(QString category); 38 void setCategory(QString category);
38 39
39 void registerShortcut(QAction *, QString overrideName = ""); 40 void registerShortcut(QAction *, QString overrideName = "");
40 void registerAlternativeShortcut(QAction *, QString alternative); 41 void registerAlternativeShortcut(QAction *, QString alternative);
42 void registerAlternativeShortcut(QAction *, QKeySequence alternative);
41 43
42 void registerShortcut(QString actionName, QString shortcut, QString tipText); 44 void registerShortcut(QString actionName, QString shortcut, QString tipText);
43 void registerAlternativeShortcut(QString actionName, QString alternative); 45 void registerAlternativeShortcut(QString actionName, QString alternative);
46 void registerAlternativeShortcut(QString actionName, QKeySequence alternative);
44 47
45 void show(); 48 void show();
46 void hide(); 49 void hide();
47 50
48 protected slots: 51 protected slots: