diff options
Diffstat (limited to 'attic/muse2-oom/muse2/muse/widgets/shortcutconfig.h')
-rw-r--r-- | attic/muse2-oom/muse2/muse/widgets/shortcutconfig.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/attic/muse2-oom/muse2/muse/widgets/shortcutconfig.h b/attic/muse2-oom/muse2/muse/widgets/shortcutconfig.h new file mode 100644 index 00000000..0cc11dd7 --- /dev/null +++ b/attic/muse2-oom/muse2/muse/widgets/shortcutconfig.h @@ -0,0 +1,60 @@ +// +// 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 + +class QCloseEvent; + +#include "ui_shortcutconfigbase.h" + +#define SHRT_CATEGORY_COL 0 +enum + { + SHRT_DESCR_COL = 0, + SHRT_SHRTCUT_COL + }; + +class SCListViewItem : public QTreeWidgetItem { + private: + int index; + + public: + SCListViewItem(QTreeWidget* parent, int i) + : QTreeWidgetItem(parent), index(i) { } + int getIndex() { return index; } + +}; + + +class ShortcutConfig : public QDialog, public Ui::ShortcutConfigBase { + Q_OBJECT + private: + int current_category; + void updateSCListView(int category); + void updateSCListView() { updateSCListView(current_category); } + void closeEvent(QCloseEvent *e); + + private slots: + void categorySelChanged(QTreeWidgetItem*, int); + void shortcutSelChanged(QTreeWidgetItem*, int); + void assignShortcut(); + void clearShortcut(); + void assignAll(); + + + public: + ShortcutConfig(QWidget* parent); + bool _config_changed; + +}; + +#endif |