📄 pda_form.cpp
字号:
/****************************************************************************** Form implementation generated from reading ui file 'pda_form.ui'**** Created: 日 8月 31 21:26:13 2008** by: The User Interface Compiler ($Id: qt/main.cpp 3.1.1 edited Nov 21 17:40 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "pda_form.h"#include <qvariant.h>#include <qlabel.h>#include <qlcdnumber.h>#include <qpushbutton.h>#include <qspinbox.h>#include <qtabwidget.h>#include <qwidget.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "pda_form.ui.h"/* * Constructs a pda_Form as a child of 'parent', with the * name 'name' and widget flags set to 'f'. * * The dialog will by default be modeless, unless you set 'modal' to * TRUE to construct a modal dialog. */pda_Form::pda_Form( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ){ if ( !name ) setName( "pda_Form" ); setMinimumSize( QSize( 360, 460 ) ); setMaximumSize( QSize( 360, 460 ) ); setBaseSize( QSize( 360, 460 ) ); messageLabel = new QLabel( this, "messageLabel" ); messageLabel->setGeometry( QRect( 0, 0, 360, 70 ) ); disconnectButton = new QPushButton( this, "disconnectButton" ); disconnectButton->setGeometry( QRect( 20, 400, 90, 50 ) ); connectButton = new QPushButton( this, "connectButton" ); connectButton->setGeometry( QRect( 140, 400, 90, 50 ) ); closeButton = new QPushButton( this, "closeButton" ); closeButton->setGeometry( QRect( 260, 400, 90, 50 ) ); tabWidget2 = new QTabWidget( this, "tabWidget2" ); tabWidget2->setGeometry( QRect( 0, 70, 360, 330 ) ); tab = new QWidget( tabWidget2, "tab" ); textLabel1 = new QLabel( tab, "textLabel1" ); textLabel1->setGeometry( QRect( 38, 14, 100, 30 ) ); set_lum_step1 = new QPushButton( tab, "set_lum_step1" ); set_lum_step1->setGeometry( QRect( 158, 44, 20, 20 ) ); set_lum_step10 = new QPushButton( tab, "set_lum_step10" ); set_lum_step10->setEnabled( FALSE ); set_lum_step10->setGeometry( QRect( 158, 64, 20, 20 ) ); set_lum_step50 = new QPushButton( tab, "set_lum_step50" ); set_lum_step50->setGeometry( QRect( 158, 84, 20, 20 ) ); textLabel4 = new QLabel( tab, "textLabel4" ); textLabel4->setGeometry( QRect( 188, 44, 40, 51 ) ); textLabel2 = new QLabel( tab, "textLabel2" ); textLabel2->setGeometry( QRect( 38, 104, 101, 31 ) ); textLabel6 = new QLabel( tab, "textLabel6" ); textLabel6->setGeometry( QRect( 178, 134, 16, 21 ) ); textLabel5 = new QLabel( tab, "textLabel5" ); textLabel5->setGeometry( QRect( 198, 134, 40, 51 ) ); textLabel3 = new QLabel( tab, "textLabel3" ); textLabel3->setGeometry( QRect( 38, 194, 101, 31 ) ); textLabel7 = new QLabel( tab, "textLabel7" ); textLabel7->setGeometry( QRect( 178, 224, 60, 51 ) ); set_humidityButton = new QPushButton( tab, "set_humidityButton" ); set_humidityButton->setGeometry( QRect( 258, 224, 91, 51 ) ); set_temperatureButton = new QPushButton( tab, "set_temperatureButton" ); set_temperatureButton->setGeometry( QRect( 258, 134, 91, 51 ) ); set_luminosityButton = new QPushButton( tab, "set_luminosityButton" ); set_luminosityButton->setGeometry( QRect( 258, 44, 90, 50 ) ); luminosity_Box = new QSpinBox( tab, "luminosity_Box" ); luminosity_Box->setGeometry( QRect( 38, 44, 120, 50 ) ); luminosity_Box->setMaxValue( 2000 ); luminosity_Box->setLineStep( 10 ); luminosity_Box->setValue( 100 ); temperature_Box = new QSpinBox( tab, "temperature_Box" ); temperature_Box->setGeometry( QRect( 38, 134, 120, 50 ) ); temperature_Box->setMaxValue( 30 ); temperature_Box->setMinValue( 6 ); temperature_Box->setValue( 20 ); humidity_Box = new QSpinBox( tab, "humidity_Box" ); humidity_Box->setGeometry( QRect( 39, 224, 120, 51 ) ); humidity_Box->setMaxValue( 90 ); humidity_Box->setMinValue( 20 ); humidity_Box->setValue( 50 ); tabWidget2->insertTab( tab, "" ); tab_2 = new QWidget( tabWidget2, "tab_2" ); textLabel8 = new QLabel( tab_2, "textLabel8" ); textLabel8->setGeometry( QRect( 170, 70, 20, 51 ) ); textLabel10 = new QLabel( tab_2, "textLabel10" ); textLabel10->setGeometry( QRect( 198, 35, 101, 40 ) ); textLabel9 = new QLabel( tab_2, "textLabel9" ); textLabel9->setGeometry( QRect( 60, 40, 101, 31 ) ); ovenstartButton = new QPushButton( tab_2, "ovenstartButton" ); ovenstartButton->setGeometry( QRect( 128, 155, 100, 50 ) ); ovenstopButton = new QPushButton( tab_2, "ovenstopButton" ); ovenstopButton->setGeometry( QRect( 130, 230, 100, 50 ) ); oven_minBox = new QSpinBox( tab_2, "oven_minBox" ); oven_minBox->setGeometry( QRect( 58, 74, 101, 51 ) ); oven_minBox->setMaxValue( 30 ); oven_secBox = new QSpinBox( tab_2, "oven_secBox" ); oven_secBox->setGeometry( QRect( 198, 74, 101, 51 ) ); oven_secBox->setMaxValue( 59 ); tabWidget2->insertTab( tab_2, "" ); tab_3 = new QWidget( tabWidget2, "tab_3" ); hang_outButton = new QPushButton( tab_3, "hang_outButton" ); hang_outButton->setGeometry( QRect( 90, 120, 180, 70 ) ); stopButton = new QPushButton( tab_3, "stopButton" ); stopButton->setGeometry( QRect( 90, 210, 180, 70 ) ); collect_clothesButton = new QPushButton( tab_3, "collect_clothesButton" ); collect_clothesButton->setGeometry( QRect( 90, 30, 180, 70 ) ); tabWidget2->insertTab( tab_3, "" ); tab_4 = new QWidget( tabWidget2, "tab_4" ); codelCDNumber = new QLCDNumber( tab_4, "codelCDNumber" ); codelCDNumber->setGeometry( QRect( 8, 4, 340, 40 ) ); codelCDNumber->setNumDigits( 15 ); codelCDNumber->setSegmentStyle( QLCDNumber::Flat ); submitbutton = new QPushButton( tab_4, "submitbutton" ); submitbutton->setGeometry( QRect( 248, 214, 81, 41 ) ); QFont submitbutton_font( submitbutton->font() ); submitbutton_font.setPointSize( 14 ); submitbutton->setFont( submitbutton_font ); push1Button = new QPushButton( tab_4, "push1Button" ); push1Button->setGeometry( QRect( 48, 64, 51, 51 ) ); push2Button = new QPushButton( tab_4, "push2Button" ); push2Button->setGeometry( QRect( 108, 64, 51, 51 ) ); push3Button = new QPushButton( tab_4, "push3Button" ); push3Button->setGeometry( QRect( 168, 64, 51, 51 ) ); push4Button = new QPushButton( tab_4, "push4Button" ); push4Button->setGeometry( QRect( 48, 124, 51, 51 ) ); push5Button = new QPushButton( tab_4, "push5Button" ); push5Button->setGeometry( QRect( 108, 124, 51, 51 ) ); push6Button = new QPushButton( tab_4, "push6Button" ); push6Button->setGeometry( QRect( 168, 124, 51, 51 ) ); push7Button = new QPushButton( tab_4, "push7Button" ); push7Button->setGeometry( QRect( 48, 184, 51, 51 ) ); push8Button = new QPushButton( tab_4, "push8Button" ); push8Button->setGeometry( QRect( 108, 184, 51, 51 ) ); push9Button = new QPushButton( tab_4, "push9Button" ); push9Button->setGeometry( QRect( 168, 184, 51, 51 ) ); push11Button = new QPushButton( tab_4, "push11Button" ); push11Button->setGeometry( QRect( 48, 244, 51, 51 ) ); push0Button = new QPushButton( tab_4, "push0Button" ); push0Button->setGeometry( QRect( 108, 244, 51, 51 ) ); push12Button = new QPushButton( tab_4, "push12Button" ); push12Button->setGeometry( QRect( 168, 244, 51, 51 ) ); resetbuttonButton = new QPushButton( tab_4, "resetbuttonButton" ); resetbuttonButton->setGeometry( QRect( 248, 114, 81, 41 ) ); QFont resetbuttonButton_font( resetbuttonButton->font() ); resetbuttonButton_font.setPointSize( 14 ); resetbuttonButton->setFont( resetbuttonButton_font ); tabWidget2->insertTab( tab_4, "" ); languageChange(); resize( QSize(360, 460).expandedTo(minimumSizeHint()) ); // signals and slots connections connect( closeButton, SIGNAL( clicked() ), this, SLOT( order_close() ) ); connect( push1Button, SIGNAL( clicked() ), this, SLOT( push1() ) ); connect( push2Button, SIGNAL( clicked() ), this, SLOT( push2() ) ); connect( push3Button, SIGNAL( clicked() ), this, SLOT( push3() ) ); connect( push4Button, SIGNAL( clicked() ), this, SLOT( push4() ) ); connect( push5Button, SIGNAL( clicked() ), this, SLOT( push5() ) ); connect( push6Button, SIGNAL( clicked() ), this, SLOT( push6() ) ); connect( push7Button, SIGNAL( clicked() ), this, SLOT( push7() ) ); connect( push8Button, SIGNAL( clicked() ), this, SLOT( push8() ) ); connect( push9Button, SIGNAL( clicked() ), this, SLOT( push9() ) ); connect( push0Button, SIGNAL( clicked() ), this, SLOT( push0() ) ); connect( push11Button, SIGNAL( clicked() ), this, SLOT( push11() ) ); connect( push12Button, SIGNAL( clicked() ), this, SLOT( push12() ) ); connect( resetbuttonButton, SIGNAL( clicked() ), this, SLOT( resetbutton() ) ); connect( set_lum_step1, SIGNAL( clicked() ), this, SLOT( setlumStep1() ) ); connect( set_lum_step10, SIGNAL( clicked() ), this, SLOT( setlumStep10() ) ); connect( set_lum_step50, SIGNAL( clicked() ), this, SLOT( setlumStep50() ) ); connect( disconnectButton, SIGNAL( clicked() ), this, SLOT( disconnect_bt() ) ); connect( connectButton, SIGNAL( clicked() ), this, SLOT( connect_bt() ) ); connect( set_luminosityButton, SIGNAL( clicked() ), this, SLOT( set_lum() ) ); connect( set_temperatureButton, SIGNAL( clicked() ), this, SLOT( set_tem() ) ); connect( set_humidityButton, SIGNAL( clicked() ), this, SLOT( set_hum() ) ); connect( ovenstartButton, SIGNAL( clicked() ), this, SLOT( oven_start() ) ); connect( ovenstopButton, SIGNAL( clicked() ), this, SLOT( oven_stop() ) ); connect( collect_clothesButton, SIGNAL( clicked() ), this, SLOT( collect_clothes() ) ); connect( hang_outButton, SIGNAL( clicked() ), this, SLOT( hang_out() ) ); connect( stopButton, SIGNAL( clicked() ), this, SLOT( clothes_stop() ) ); connect( submitbutton, SIGNAL( clicked() ), this, SLOT( door_submit() ) );resetbutton();}/* * Destroys the object and frees any allocated resources */pda_Form::~pda_Form(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void pda_Form::languageChange(){ setCaption( tr( "Form1" ) ); messageLabel->setText( QString::null ); disconnectButton->setText( tr( "Disconnect\n""bluetooth" ) ); connectButton->setText( tr( "Connect\n""bluetooth" ) ); closeButton->setText( tr( "Close" ) ); textLabel1->setText( tr( "<h2>luminosity</h2>" ) ); set_lum_step1->setText( tr( "1" ) ); set_lum_step10->setText( tr( "10" ) ); set_lum_step50->setText( tr( "50" ) ); textLabel4->setText( tr( "<h1>lux</h1>" ) ); textLabel2->setText( tr( "<h2>temperature</h2>" ) ); textLabel6->setText( tr( "<h3>O</h3>" ) ); textLabel5->setText( tr( "<h1>C</h1>" ) ); textLabel3->setText( tr( "<h2>humidity</h2>" ) ); textLabel7->setText( tr( "<h1>%RH</h1>" ) ); set_humidityButton->setText( tr( "set humidity" ) ); set_temperatureButton->setText( tr( "set temperature" ) ); set_luminosityButton->setText( tr( "set luminosity" ) ); tabWidget2->changeTab( tab, tr( "environment" ) ); textLabel8->setText( tr( "<h1>:</h1>" ) ); textLabel10->setText( tr( "<h2>seconds</h2>" ) ); textLabel9->setText( tr( "<h2>minutes</h2>" ) ); ovenstartButton->setText( tr( "oven start" ) ); ovenstopButton->setText( tr( "oven stop" ) ); tabWidget2->changeTab( tab_2, tr( "micro-wave oven" ) ); hang_outButton->setText( tr( "hang out" ) ); stopButton->setText( tr( "stop" ) ); collect_clothesButton->setText( tr( "collect clothes" ) ); tabWidget2->changeTab( tab_3, tr( "collecting clothes" ) ); submitbutton->setText( tr( "submit" ) ); push1Button->setText( tr( "1" ) ); push2Button->setText( tr( "2" ) ); push3Button->setText( tr( "3" ) ); push4Button->setText( tr( "4" ) ); push5Button->setText( tr( "5" ) ); push6Button->setText( tr( "6" ) ); push7Button->setText( tr( "7" ) ); push8Button->setText( tr( "8" ) ); push9Button->setText( tr( "9" ) ); push11Button->setText( tr( "*" ) ); push0Button->setText( tr( "0" ) ); push12Button->setText( tr( "#" ) ); resetbuttonButton->setText( tr( "reset" ) ); tabWidget2->changeTab( tab_4, tr( "door" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -