Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit 7fed9587e9
)
r14.0.x
parent
12007bb689
commit
a2cb178bed
@ -0,0 +1,72 @@
|
||||
<!DOCTYPE UI><UI version="3.1" stdsetdef="1">
|
||||
<class>KHotKeys::Waiting_widget_ui</class>
|
||||
<widget class="TQWidget">
|
||||
<property name="name">
|
||||
<cstring>Waiting_widget_ui</cstring>
|
||||
</property>
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>580</width>
|
||||
<height>480</height>
|
||||
</rect>
|
||||
</property>
|
||||
<hbox>
|
||||
<property name="name">
|
||||
<cstring>unnamed</cstring>
|
||||
</property>
|
||||
<property name="margin">
|
||||
<number>11</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
<number>6</number>
|
||||
</property>
|
||||
<widget class="TQLabel">
|
||||
<property name="name">
|
||||
<cstring>waiting_label</cstring>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Waiting time (ms): </string>
|
||||
</property>
|
||||
<property name="buddy" stdset="0">
|
||||
<cstring>waiting_spinbox</cstring>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="KIntSpinBox">
|
||||
<property name="name">
|
||||
<cstring>waiting_spinbox</cstring>
|
||||
</property>
|
||||
<property name="minValue">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="maxValue">
|
||||
<number>20000</number>
|
||||
</property>
|
||||
</widget>
|
||||
<spacer>
|
||||
<property name="name">
|
||||
<cstring>Spacer16</cstring>
|
||||
</property>
|
||||
<property name="orientation">
|
||||
<enum>Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>Expanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint">
|
||||
<size>
|
||||
<width>0</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</hbox>
|
||||
</widget>
|
||||
<includes>
|
||||
<include location="global" impldecl="in implementation">kdialog.h</include>
|
||||
<include location="global" impldecl="in implementation">knuminput.h</include>
|
||||
</includes>
|
||||
<layoutdefaults spacing="6" margin="11"/>
|
||||
<layoutfunctions spacing="KDialog::spacingHint" margin="KDialog::marginHint"/>
|
||||
</UI>
|
@ -0,0 +1,56 @@
|
||||
/****************************************************************************
|
||||
|
||||
KHotKeys
|
||||
|
||||
Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Distributed under the terms of the GNU General Public License version 2.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#define _WAITING_WIDGET_CPP_
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#include "waiting_widget.h"
|
||||
|
||||
#include <knuminput.h>
|
||||
|
||||
#include <kdebug.h>
|
||||
|
||||
#include <actions.h>
|
||||
#include <action_data.h>
|
||||
|
||||
#include "windowdef_list_widget.h"
|
||||
#include "kcmkhotkeys.h"
|
||||
|
||||
namespace KHotKeys
|
||||
{
|
||||
|
||||
Waiting_widget::Waiting_widget( TQWidget* parent_P, const char* name_P )
|
||||
: Waiting_widget_ui( parent_P, name_P )
|
||||
{
|
||||
// KHotKeys::Module::changed()
|
||||
connect(waiting_spinbox, TQT_SIGNAL(valueChanged(int)),
|
||||
module, TQT_SLOT(changed()));
|
||||
}
|
||||
|
||||
void Waiting_widget::set_data( const Waiting_action* data_P )
|
||||
{
|
||||
if( data_P == NULL )
|
||||
{
|
||||
return;
|
||||
}
|
||||
waiting_spinbox->setValue(data_P->_waiting_time);
|
||||
}
|
||||
|
||||
Waiting_action* Waiting_widget::get_data( Action_data* data_P ) const
|
||||
{
|
||||
return new Waiting_action( data_P, waiting_spinbox->value());
|
||||
}
|
||||
|
||||
} // namespace KHotKeys
|
||||
|
||||
#include "waiting_widget.moc"
|
@ -0,0 +1,36 @@
|
||||
/****************************************************************************
|
||||
|
||||
KHotKeys
|
||||
|
||||
Copyright (C) 1999-2001 Lubos Lunak <l.lunak@kde.org>
|
||||
|
||||
Distributed under the terms of the GNU General Public License version 2.
|
||||
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef _WAITING_WIDGET_H_
|
||||
#define _WAITING_WIDGET_H_
|
||||
|
||||
#include <waiting_widget_ui.h>
|
||||
|
||||
namespace KHotKeys
|
||||
{
|
||||
|
||||
class Waiting_action;
|
||||
class Action_data;
|
||||
|
||||
class Waiting_widget
|
||||
: public Waiting_widget_ui
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
Waiting_widget( TQWidget* parent_P = NULL, const char* name_P = NULL );
|
||||
void set_data( const Waiting_action* data_P );
|
||||
Waiting_action* get_data( Action_data* data_P ) const;
|
||||
};
|
||||
|
||||
typedef Waiting_widget Waiting_tab;
|
||||
|
||||
} // namespace KHotKeys
|
||||
|
||||
#endif
|
Loading…
Reference in new issue