From 4aed2c8219774f5d797760606b8489a92ddc5163 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: 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 --- khotkeys/kcontrol/main_buttons_widget.cpp | 51 +++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 khotkeys/kcontrol/main_buttons_widget.cpp (limited to 'khotkeys/kcontrol/main_buttons_widget.cpp') diff --git a/khotkeys/kcontrol/main_buttons_widget.cpp b/khotkeys/kcontrol/main_buttons_widget.cpp new file mode 100644 index 000000000..fb8718a1c --- /dev/null +++ b/khotkeys/kcontrol/main_buttons_widget.cpp @@ -0,0 +1,51 @@ +/**************************************************************************** + + KHotKeys + + Copyright (C) 1999-2001 Lubos Lunak + + Distributed under the terms of the GNU General Public License version 2. + +****************************************************************************/ + +#define MAIN_BUTTONS_WIDGET_CPP + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "main_buttons_widget.h" + +#include + +#include "kcmkhotkeys.h" + +namespace KHotKeys +{ + +Main_buttons_widget::Main_buttons_widget( QWidget* parent_P, const char* name_P ) + : Main_buttons_widget_ui( parent_P, name_P ) + { + connect( new_action_button, SIGNAL( clicked()), SIGNAL( new_action_pressed())); + connect( new_action_group_button, SIGNAL( clicked()), SIGNAL( new_action_group_pressed())); + connect( delete_action_button, SIGNAL( clicked()), SIGNAL( delete_action_pressed())); + connect( global_settings_button, SIGNAL( clicked()), SIGNAL( global_settings_pressed())); + enable_delete( false ); + // KHotKeys::Module::changed() + connect( new_action_button, SIGNAL( clicked()), + module, SLOT( changed())); + connect( new_action_group_button, SIGNAL( clicked()), + module, SLOT( changed())); + connect( delete_action_button, SIGNAL( clicked()), + module, SLOT( changed())); + setMaximumHeight( sizeHint().height()); // it gets too high and I have no idea why + } + +void Main_buttons_widget::enable_delete( bool enable_P ) + { + delete_action_button->setEnabled( enable_P ); + } + +} // namespace KHotKeys + +#include "main_buttons_widget.moc" -- cgit v1.2.1