#include #include /**************************************************************************** ** 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 #include #include #include #include #include #include /* * Constructs a BrightnessChooser as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ BrightnessChooser::BrightnessChooser( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "BrightnessChooser" ); BrightnessChooserLayout = new QGridLayout( this, 1, 1, 11, 6, "BrightnessChooserLayout"); layout9 = new QGridLayout( 0, 1, 1, 0, 6, "layout9"); layout7 = new QHBoxLayout( 0, 0, 0, "layout7"); spacer1 = new QSpacerItem( 20, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); layout7->addItem( spacer1 ); layout5 = new QVBoxLayout( 0, 0, 6, "layout5"); valueLabel = new QLabel( this, "valueLabel" ); valueLabel->setAlignment( int( QLabel::AlignCenter ) ); layout5->addWidget( valueLabel ); brightnessSlider = new QSlider( this, "brightnessSlider" ); brightnessSlider->setOrientation( QSlider::Vertical ); layout5->addWidget( brightnessSlider ); layout7->addLayout( layout5 ); spacer1_2 = new QSpacerItem( 16, 20, QSizePolicy::Minimum, QSizePolicy::Minimum ); layout7->addItem( spacer1_2 ); layout9->addLayout( layout7, 0, 0 ); okButton = new QPushButton( this, "okButton" ); okButton->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)1, 0, 0, okButton->sizePolicy().hasHeightForWidth() ) ); layout9->addWidget( okButton, 1, 0 ); BrightnessChooserLayout->addLayout( layout9, 0, 0 ); languageChange(); resize( QSize(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, Qt 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" ) ); QToolTip::add( brightnessSlider, tr2i18n( "set the brightness and click OK or press ENTER" ) ); okButton->setText( tr2i18n( "&OK" ) ); okButton->setAccel( QKeySequence( tr2i18n( "Alt+O" ) ) ); } void BrightnessChooser::updateBrightness() { qWarning( "BrightnessChooser::updateBrightness(): Not implemented yet" ); } void BrightnessChooser::updateValue(int) { qWarning( "BrightnessChooser::updateValue(int): Not implemented yet" ); } #include "brightnesschooser.moc"