blob: 6031873893df5594d909a4bcaee5d7ca8f1235e3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
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(TQWidget* tqparent, const char* name)
: FirstRunDialogUI(tqparent, name)
{
connect(key_button, TQT_SIGNAL(capturedShortcut(const KShortcut&)),
this, TQT_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);
}
}
|