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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#include <kdialog.h>
#include <klocale.h>
/****************************************************************************
** Form implementation generated from reading ui file '/home/bettini/work/klcddimmer/src/brightnesschooser.ui'
**
** Created: Sat Feb 24 20:45:57 2007
** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.7 edited Aug 31 2005 $)
**
** WARNING! All changes made in this file will be lost!
****************************************************************************/
#include "brightnesschooser.h"
#include <ntqvariant.h>
#include <ntqpushbutton.h>
#include <ntqlabel.h>
#include <ntqslider.h>
#include <ntqlayout.h>
#include <ntqtooltip.h>
#include <ntqwhatsthis.h>
/*
* Constructs a BrightnessChooser as a child of 'parent', with the
* name 'name' and widget flags set to 'f'.
*/
BrightnessChooser::BrightnessChooser( TQWidget* parent, const char* name, WFlags fl )
: TQWidget( parent, name, fl )
{
if ( !name )
setName( "BrightnessChooser" );
BrightnessChooserLayout = new TQGridLayout( this, 1, 1, 11, 6, "BrightnessChooserLayout");
layout9 = new TQGridLayout( 0, 1, 1, 0, 6, "layout9");
layout7 = new TQHBoxLayout( 0, 0, 0, "layout7");
spacer1 = new TQSpacerItem( 20, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
layout7->addItem( spacer1 );
layout5 = new TQVBoxLayout( 0, 0, 6, "layout5");
valueLabel = new TQLabel( this, "valueLabel" );
valueLabel->setAlignment( int( TQLabel::AlignCenter ) );
layout5->addWidget( valueLabel );
brightnessSlider = new TQSlider( this, "brightnessSlider" );
brightnessSlider->setOrientation( TQSlider::Vertical );
layout5->addWidget( brightnessSlider );
layout7->addLayout( layout5 );
spacer1_2 = new TQSpacerItem( 16, 20, TQSizePolicy::Minimum, TQSizePolicy::Minimum );
layout7->addItem( spacer1_2 );
layout9->addLayout( layout7, 0, 0 );
okButton = new TQPushButton( this, "okButton" );
okButton->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)1, (TQSizePolicy::SizeType)1, 0, 0, okButton->sizePolicy().hasHeightForWidth() ) );
layout9->addWidget( okButton, 1, 0 );
BrightnessChooserLayout->addLayout( layout9, 0, 0 );
languageChange();
resize( TQSize(124, 163).expandedTo(minimumSizeHint()) );
clearWState( WState_Polished );
// signals and slots connections
connect( okButton, SIGNAL( clicked() ), this, SLOT( updateBrightness() ) );
connect( brightnessSlider, SIGNAL( valueChanged(int) ), this, SLOT( updateValue(int) ) );
}
/*
* Destroys the object and frees any allocated resources
*/
BrightnessChooser::~BrightnessChooser()
{
// no need to delete child widgets, TQt does it all for us
}
/*
* Sets the strings of the subwidgets using the current
* language.
*/
void BrightnessChooser::languageChange()
{
setCaption( tr2i18n( "Form1" ) );
valueLabel->setText( tr2i18n( "0" ) );
TQToolTip::add( brightnessSlider, tr2i18n( "set the brightness and click OK or press ENTER" ) );
okButton->setText( tr2i18n( "&OK" ) );
okButton->setAccel( TQKeySequence( tr2i18n( "Alt+O" ) ) );
}
void BrightnessChooser::updateBrightness()
{
tqWarning( "BrightnessChooser::updateBrightness(): Not implemented yet" );
}
void BrightnessChooser::updateValue(int)
{
tqWarning( "BrightnessChooser::updateValue(int): Not implemented yet" );
}
#include "brightnesschooser.moc"
|