diff options
author | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
---|---|---|
committer | toma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2009-11-25 17:56:58 +0000 |
commit | 4aed2c8219774f5d797760606b8489a92ddc5163 (patch) | |
tree | 3f8c130f7d269626bf6a9447407ef6c35954426a /khotkeys/kcontrol/voice_settings_tab.cpp | |
download | tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.tar.gz tdebase-4aed2c8219774f5d797760606b8489a92ddc5163.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/kdebase@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khotkeys/kcontrol/voice_settings_tab.cpp')
-rw-r--r-- | khotkeys/kcontrol/voice_settings_tab.cpp | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/khotkeys/kcontrol/voice_settings_tab.cpp b/khotkeys/kcontrol/voice_settings_tab.cpp new file mode 100644 index 000000000..684ca0cdf --- /dev/null +++ b/khotkeys/kcontrol/voice_settings_tab.cpp @@ -0,0 +1,68 @@ +/**************************************************************************** + + KHotKeys + + Copyright (C) 2005 Olivier Goffart <ogoffart @ kde.org> + + Distributed under the terms of the GNU General Public License version 2. + +****************************************************************************/ + +#include "voice_settings_tab.h" + +#include <klocale.h> +#include <qcombobox.h> +#include <knuminput.h> +#include <qcheckbox.h> +#include <kkeybutton.h> +#include <kkeydialog.h> + +#include "kcmkhotkeys.h" +#include "windowdef_list_widget.h" + +namespace KHotKeys +{ + +Voice_settings_tab::Voice_settings_tab( QWidget* parent_P, const char* name_P ) + : Voice_settings_tab_ui( parent_P, name_P ) + { + connect( keyButton , SIGNAL(capturedShortcut (const KShortcut &)) , this, SLOT(slotCapturedKey( const KShortcut& ))); + } + +void Voice_settings_tab::read_data() + { + keyButton->setShortcut( module->voice_shortcut() ); + } + +void Voice_settings_tab::write_data() const + { + module->set_voice_shortcut( keyButton->shortcut() ); + } + +void Voice_settings_tab::clear_data() + { + // "global" tab, not action specific, do nothing + } + +void Voice_settings_tab::slotCapturedKey( const KShortcut& cut) + { + /*for(uint seq=0; seq<KShortcut::MAX_SEQUENCES; seq++) + { + KKeySequance key=cut.seq(seq); + if(key.isNull()) + continue; + if(key.count() > 1) + return; + }*/ + + if(KKeyChooser::checkGlobalShortcutsConflict(cut,true,this)) + return; + if(KKeyChooser::checkStandardShortcutsConflict(cut,true,this)) + return; + + keyButton->setShortcut(cut); + module->changed(); + } +} // namespace KHotKeys + +#include "voice_settings_tab.moc" |