summaryrefslogtreecommitdiffstats
path: root/juk/keydialog.h
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commite2de64d6f1beb9e492daf5b886e19933c1fa41dd (patch)
tree9047cf9e6b5c43878d5bf82660adae77ceee097a /juk/keydialog.h
downloadtdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.tar.gz
tdemultimedia-e2de64d6f1beb9e492daf5b886e19933c1fa41dd.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/keydialog.h')
-rw-r--r--juk/keydialog.h85
1 files changed, 85 insertions, 0 deletions
diff --git a/juk/keydialog.h b/juk/keydialog.h
new file mode 100644
index 00000000..13d76d4f
--- /dev/null
+++ b/juk/keydialog.h
@@ -0,0 +1,85 @@
+/***************************************************************************
+ begin : Tue Mar 11 19:00:00 CET 2003
+ copyright : (C) 2003 by Stefan Asserhall
+ email : stefan.asserhall@telia.com
+***************************************************************************/
+
+/***************************************************************************
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License as published by *
+ * the Free Software Foundation; either version 2 of the License, or *
+ * (at your option) any later version. *
+ * *
+ ***************************************************************************/
+
+#ifndef KEYDIALOG_H
+#define KEYDIALOG_H
+
+#include <kdeversion.h>
+#include <kglobalaccel.h>
+#include <kkeydialog.h>
+
+#include <qhbuttongroup.h>
+#include <qwidgetstack.h>
+
+class KeyDialog : public KDialogBase
+{
+ Q_OBJECT
+
+public:
+ /**
+ * Constructs a KeyDialog called @p name as a child of @p parent.
+ */
+ KeyDialog(KGlobalAccel *keys, KActionCollection *actionCollection, QWidget *parent = 0, const char* name = 0);
+
+ /**
+ * Destructor. Deletes all resources used by a KeyDialog object.
+ */
+ virtual ~KeyDialog();
+
+ /**
+ * This is a member function, provided to allow inserting both global
+ * accelerators and actions. It behaves essentially like the functions
+ * in KKeyDialog.
+ */
+ static int configure(KGlobalAccel *keys, KActionCollection *actionCollection, QWidget *parent = 0);
+
+ /**
+ * This is a member function, provided to create a global accelerator with
+ * standard keys. It behaves like the function in KGlobalAccel.
+ */
+ static void insert(KGlobalAccel *keys, const QString &action, const QString &label,
+ const QObject *objSlot, const char *methodSlot);
+
+private:
+
+ /**
+ * Groups of keys that can be selected in the dialog.
+ */
+ enum KeyGroup { NoKeys = 0, StandardKeys = 1, MultimediaKeys = 2 };
+
+ struct KeyInfo {
+ QString action;
+ KShortcut shortcut[3][2];
+ };
+
+ void newDialog(KGlobalAccel *keys, KActionCollection *actionCollection, int selectedButton = 0);
+ int configure();
+
+private slots:
+ void slotKeys(int group);
+ void slotDefault();
+
+private:
+ KActionCollection *m_actionCollection;
+ KGlobalAccel *m_keys;
+ KKeyChooser *m_pKeyChooser;
+ QHButtonGroup *m_group;
+ QWidgetStack *m_widgetStack;
+
+ static const KeyInfo keyInfo[];
+ static const uint keyInfoCount;
+};
+
+#endif // KEYDIALOG_H