summaryrefslogtreecommitdiffstats
path: root/yakuake/src/first_run_dialog.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:26:02 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-03-01 19:26:02 +0000
commitbd2ea3c166a0815f02187a84c7cbf7f7c4b117a3 (patch)
tree88008b1681b6ac25c35296532c34ba72f2f47d2a /yakuake/src/first_run_dialog.cpp
downloadyakuake-bd2ea3c166a0815f02187a84c7cbf7f7c4b117a3.tar.gz
yakuake-bd2ea3c166a0815f02187a84c7cbf7f7c4b117a3.zip
Added KDE3 version of Yakuake
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/yakuake@1097626 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'yakuake/src/first_run_dialog.cpp')
-rw-r--r--yakuake/src/first_run_dialog.cpp49
1 files changed, 49 insertions, 0 deletions
diff --git a/yakuake/src/first_run_dialog.cpp b/yakuake/src/first_run_dialog.cpp
new file mode 100644
index 0000000..bbae3a4
--- /dev/null
+++ b/yakuake/src/first_run_dialog.cpp
@@ -0,0 +1,49 @@
+/*
+ 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.
+*/
+
+/*
+ Copyright (C) 2007 Eike Hein <hein@kde.org>
+*/
+
+
+#include "first_run_dialog.h"
+#include "first_run_dialog.moc"
+
+#include <kkeybutton.h>
+#include <kshortcut.h>
+#include <kkeydialog.h>
+
+
+FirstRunDialog::FirstRunDialog(QWidget* parent, const char* name)
+ : FirstRunDialogUI(parent, name)
+{
+ connect(key_button, SIGNAL(capturedShortcut(const KShortcut&)),
+ this, SLOT(validateShortcut(const KShortcut&)));
+}
+
+FirstRunDialog::~FirstRunDialog()
+{
+}
+
+KShortcut FirstRunDialog::shortcut()
+{
+ return key_button->shortcut();
+}
+
+void FirstRunDialog::setShortcut(const KShortcut& shortcut)
+{
+ key_button->setShortcut(shortcut, false);
+}
+
+void FirstRunDialog::validateShortcut(const KShortcut& shortcut)
+{
+ if (!KKeyChooser::checkGlobalShortcutsConflict(shortcut, true, this)
+ && !KKeyChooser::KKeyChooser::checkStandardShortcutsConflict(shortcut, true, this))
+ {
+ key_button->setShortcut(shortcut, false);
+ }
+}