comparison widgets/KeyReference.h @ 282:4edaff85875d

* Add mouse actions to key and mouse reference dialog * Use QDialogButtonBox in all dialogs, for proper button ordering across platforms (requires Qt 4.2) * Fix #1733610 program does not exit if preferences dialog visible on close
author Chris Cannam
date Thu, 05 Jul 2007 11:07:01 +0000
parents ac58acbd7482
children 5f3f5c1e23e8
comparison
equal deleted inserted replaced
281:ac58acbd7482 282:4edaff85875d
21 #include <vector> 21 #include <vector>
22 #include <map> 22 #include <map>
23 23
24 class QAction; 24 class QAction;
25 class QTextEdit; 25 class QTextEdit;
26 class QDialog;
27 class QAbstractButton;
26 28
27 class KeyReference : public QObject 29 class KeyReference : public QObject
28 { 30 {
29 Q_OBJECT 31 Q_OBJECT
30 32
40 void registerShortcut(QString actionName, QString shortcut, QString tipText); 42 void registerShortcut(QString actionName, QString shortcut, QString tipText);
41 void registerAlternativeShortcut(QString actionName, QString alternative); 43 void registerAlternativeShortcut(QString actionName, QString alternative);
42 44
43 void show(); 45 void show();
44 46
47 protected slots:
48 void dialogButtonClicked(QAbstractButton *);
49
45 protected: 50 protected:
46 struct KeyDetails { 51 struct KeyDetails {
47 QString actionName; 52 QString actionName;
48 QString shortcut; 53 QString shortcut;
49 QString tip; 54 QString tip;
57 QString m_currentCategory; 62 QString m_currentCategory;
58 CategoryMap m_map; 63 CategoryMap m_map;
59 CategoryList m_categoryOrder; 64 CategoryList m_categoryOrder;
60 65
61 QTextEdit *m_text; 66 QTextEdit *m_text;
67 QDialog *m_dialog;
62 }; 68 };
63 69
64 #endif 70 #endif