summaryrefslogtreecommitdiffstats
path: root/khotkeys/kcontrol/main_buttons_widget.cpp
blob: ec0671e408eef40270fc9faeaf44ecda28904b6b (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
50
51
/****************************************************************************

 KHotKeys
 
 Copyright (C) 1999-2001 Lubos Lunak <[email protected]>

 Distributed under the terms of the GNU General Public License version 2.
 
****************************************************************************/

#define MAIN_BUTTONS_WIDGET_CPP

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

#include "main_buttons_widget.h"

#include <tqpushbutton.h>

#include "kcmkhotkeys.h"

namespace KHotKeys
{

Main_buttons_widget::Main_buttons_widget( TQWidget* parent_P, const char* name_P )
    : Main_buttons_widget_ui( parent_P, name_P )
    {
    connect( new_action_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( new_action_pressed()));
    connect( new_action_group_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( new_action_group_pressed()));
    connect( delete_action_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( delete_action_pressed()));
    connect( global_settings_button, TQT_SIGNAL( clicked()), TQT_SIGNAL( global_settings_pressed()));
    enable_delete( false );
    // KHotKeys::Module::changed()
    connect( new_action_button, TQT_SIGNAL( clicked()),
        module, TQT_SLOT( changed()));
    connect( new_action_group_button, TQT_SIGNAL( clicked()),
        module, TQT_SLOT( changed()));
    connect( delete_action_button, TQT_SIGNAL( clicked()),
        module, TQT_SLOT( changed()));
    setMaximumHeight( tqsizeHint().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"