summaryrefslogtreecommitdiff
path: root/muse/muse/widgets/shortcutconfig.h
diff options
context:
space:
mode:
authorRobert Jonsson <spamatica@gmail.com>2009-12-27 11:42:55 +0000
committerRobert Jonsson <spamatica@gmail.com>2009-12-27 11:42:55 +0000
commit9f66d4ea7410ac4bca7a03498f3e13bab9df83c0 (patch)
tree7c569e32155aacf6c35d4ddcd0e662415f8c9f24 /muse/muse/widgets/shortcutconfig.h
parentb703eab295330e6f81564fbb39a10a1a2fdd2f54 (diff)
added current muse 1.0 tree to svn
Diffstat (limited to 'muse/muse/widgets/shortcutconfig.h')
-rw-r--r--muse/muse/widgets/shortcutconfig.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/muse/muse/widgets/shortcutconfig.h b/muse/muse/widgets/shortcutconfig.h
new file mode 100644
index 00000000..0602b481
--- /dev/null
+++ b/muse/muse/widgets/shortcutconfig.h
@@ -0,0 +1,59 @@
+//
+// C++ Interface: shortcutconfig
+//
+// Description:
+// Dialog for configuring keyboard shortcuts
+//
+// Author: Mathias Lundgren <lunar_shuttle@users.sourceforge.net>, (C) 2003
+//
+// Copyright: Mathias Lundgren (lunar_shuttle@users.sourceforge.net) (C) 2003
+//
+//
+#ifndef __SHORTCUTCONFIG_H
+#define __SHORTCUTCONFIG_H
+
+#include "shortcutconfigbase.h"
+#include <qlistview.h>
+
+#define SHRT_CATEGORY_COL 0
+enum
+ {
+ SHRT_DESCR_COL = 0,
+ SHRT_SHRTCUT_COL
+ };
+
+class SCListViewItem : public QListViewItem {
+ private:
+ int index;
+
+ public:
+ SCListViewItem(QListView* parent, int i)
+ : QListViewItem(parent), index(i) { }
+ int getIndex() { return index; }
+
+};
+
+
+class ShortcutConfig : public ShortcutConfigBase {
+ Q_OBJECT
+ private:
+ int current_category;
+ void updateSCListView(int category);
+ void updateSCListView() { updateSCListView(current_category); }
+ void closeEvent(QCloseEvent *e);
+
+ private slots:
+ void categorySelChanged(QListViewItem*);
+ void shortcutSelChanged(QListViewItem*);
+ void assignShortcut();
+ void clearShortcut();
+ void assignAll();
+
+
+ public:
+ ShortcutConfig(QWidget* parent, const char* name = 0);
+ bool _config_changed;
+
+};
+
+#endif