⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 carborn_form.cpp

📁 嵌入式LINUX的智能家居系统源码
💻 CPP
字号:
/****************************************************************************** Form implementation generated from reading ui file 'carborn_form.ui'**** Created: 涓�  9鏈�1 12:16:15 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 "carborn_form.h"#include <qvariant.h>#include <qgroupbox.h>#include <qlabel.h>#include <qlcdnumber.h>#include <qpushbutton.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "carborn_form.ui.h"/*  *  Constructs a carborn_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. */carborn_Form::carborn_Form( QWidget* parent, const char* name, bool modal, WFlags fl )    : QDialog( parent, name, modal, fl ){    if ( !name )	setName( "carborn_Form" );    numButton1 = new QPushButton( this, "numButton1" );    numButton1->setGeometry( QRect( 10, 40, 100, 100 ) );    QFont numButton1_font(  numButton1->font() );    numButton1_font.setPointSize( 20 );    numButton1->setFont( numButton1_font );     numButton2 = new QPushButton( this, "numButton2" );    numButton2->setGeometry( QRect( 110, 40, 100, 100 ) );    QFont numButton2_font(  numButton2->font() );    numButton2_font.setPointSize( 20 );    numButton2->setFont( numButton2_font );     numButton3 = new QPushButton( this, "numButton3" );    numButton3->setGeometry( QRect( 210, 40, 100, 100 ) );    QFont numButton3_font(  numButton3->font() );    numButton3_font.setPointSize( 20 );    numButton3->setFont( numButton3_font );     numButton4 = new QPushButton( this, "numButton4" );    numButton4->setGeometry( QRect( 10, 140, 100, 100 ) );    QFont numButton4_font(  numButton4->font() );    numButton4_font.setPointSize( 20 );    numButton4->setFont( numButton4_font );     numButton5 = new QPushButton( this, "numButton5" );    numButton5->setGeometry( QRect( 110, 140, 100, 100 ) );    QFont numButton5_font(  numButton5->font() );    numButton5_font.setPointSize( 20 );    numButton5->setFont( numButton5_font );     numButton6 = new QPushButton( this, "numButton6" );    numButton6->setGeometry( QRect( 210, 140, 100, 100 ) );    QFont numButton6_font(  numButton6->font() );    numButton6_font.setPointSize( 20 );    numButton6->setFont( numButton6_font );     numButton7 = new QPushButton( this, "numButton7" );    numButton7->setGeometry( QRect( 10, 240, 100, 100 ) );    QFont numButton7_font(  numButton7->font() );    numButton7_font.setPointSize( 20 );    numButton7->setFont( numButton7_font );     numButton8 = new QPushButton( this, "numButton8" );    numButton8->setGeometry( QRect( 110, 240, 100, 100 ) );    QFont numButton8_font(  numButton8->font() );    numButton8_font.setPointSize( 20 );    numButton8->setFont( numButton8_font );     numButton9 = new QPushButton( this, "numButton9" );    numButton9->setGeometry( QRect( 210, 240, 100, 100 ) );    QFont numButton9_font(  numButton9->font() );    numButton9_font.setPointSize( 20 );    numButton9->setFont( numButton9_font );     numButton0 = new QPushButton( this, "numButton0" );    numButton0->setGeometry( QRect( 110, 340, 100, 100 ) );    QFont numButton0_font(  numButton0->font() );    numButton0_font.setPointSize( 20 );    numButton0->setFont( numButton0_font );     numButton12 = new QPushButton( this, "numButton12" );    numButton12->setGeometry( QRect( 210, 340, 100, 100 ) );    QFont numButton12_font(  numButton12->font() );    numButton12_font.setPointSize( 20 );    numButton12->setFont( numButton12_font );     numButton11 = new QPushButton( this, "numButton11" );    numButton11->setGeometry( QRect( 10, 340, 100, 100 ) );    QFont numButton11_font(  numButton11->font() );    numButton11_font.setPointSize( 36 );    numButton11->setFont( numButton11_font ); //    passtext = new QLabel( this, "passtext" );//    passtext->setGeometry( QRect( 100, 490, 441, 401 ) );    groupBox2 = new QGroupBox( this, "groupBox2" );    groupBox2->setGeometry( QRect( 321, 70, 310, 190 ) );    submitButton = new QPushButton( groupBox2, "submitButton" );    submitButton->setGeometry( QRect( 19, 100, 121, 61 ) );    resetButton = new QPushButton( groupBox2, "resetButton" );    resetButton->setGeometry( QRect( 170, 100, 120, 60 ) );    numlCDNumber = new QLCDNumber( groupBox2, "numlCDNumber" );    numlCDNumber->setGeometry( QRect( 10, 30, 290, 40 ) );    numlCDNumber->setNumDigits( 15 );    numlCDNumber->setSegmentStyle( QLCDNumber::Flat );    groupBox1 = new QGroupBox( this, "groupBox1" );    groupBox1->setGeometry( QRect( 320, 280, 310, 120 ) );    visitButton = new QPushButton( groupBox1, "visitButton" );    visitButton->setGeometry( QRect( 80, 40, 151, 61 ) );    time_lCDNumber = new QLCDNumber( this, "time_lCDNumber" );    time_lCDNumber->setGeometry( QRect( 410, 10, 130, 41 ) );    time_lCDNumber->setNumDigits( 5 );    time_lCDNumber->setSegmentStyle( QLCDNumber::Filled );    closedoorButton = new QPushButton( this, "closedoorButton" );    closedoorButton->setGeometry( QRect( 390, 420, 171, 41 ) );    languageChange();    resize( QSize(640, 472).expandedTo(minimumSizeHint()) );    passtext = new QLabel( this, "passtext" );    passtext->setGeometry( QRect( 100, 490, 441, 401 ) );    // signals and slots connections    connect( resetButton, SIGNAL( clicked() ), this, SLOT( randButton() ) );    connect( numButton1, SIGNAL( clicked() ), this, SLOT( push1() ) );    connect( numButton2, SIGNAL( clicked() ), this, SLOT( push2() ) );    connect( numButton3, SIGNAL( clicked() ), this, SLOT( push3() ) );    connect( numButton4, SIGNAL( clicked() ), this, SLOT( push4() ) );    connect( numButton5, SIGNAL( clicked() ), this, SLOT( push5() ) );    connect( numButton6, SIGNAL( clicked() ), this, SLOT( push6() ) );    connect( numButton7, SIGNAL( clicked() ), this, SLOT( push7() ) );    connect( numButton8, SIGNAL( clicked() ), this, SLOT( push8() ) );    connect( numButton9, SIGNAL( clicked() ), this, SLOT( push9() ) );    connect( numButton0, SIGNAL( clicked() ), this, SLOT( push0() ) );    connect( numButton11, SIGNAL( clicked() ), this, SLOT( push11() ) );    connect( numButton12, SIGNAL( clicked() ), this, SLOT( push12() ) );    connect( submitButton, SIGNAL( clicked() ), this, SLOT( submit() ) );    connect( visitButton, SIGNAL( clicked() ), this, SLOT( callHost() ) );    connect( closedoorButton, SIGNAL( clicked() ), this, SLOT( closeDoor() ) );    // tab order    setTabOrder( visitButton, submitButton );    setTabOrder( submitButton, resetButton );    setTabOrder( resetButton, numButton1 );    setTabOrder( numButton1, numButton2 );    setTabOrder( numButton2, numButton3 );    setTabOrder( numButton3, numButton4 );    setTabOrder( numButton4, numButton5 );    setTabOrder( numButton5, numButton6 );    setTabOrder( numButton6, numButton7 );    setTabOrder( numButton7, numButton8 );    setTabOrder( numButton8, numButton9 );    setTabOrder( numButton9, numButton11 );    setTabOrder( numButton11, numButton0 );    setTabOrder( numButton0, numButton12 );    //initQTimer *timer = new QTimer(this);connect(timer, SIGNAL(timeout()), this, SLOT(showTime()));timer->start(200);showTime();QTimer *autotimer = new QTimer(this);connect(autotimer, SIGNAL(timeout()), this, SLOT(autoReset()));autotimer->start(2000);autoReset();        }/* *  Destroys the object and frees any allocated resources */carborn_Form::~carborn_Form(){    // no need to delete child widgets, Qt does it all for us}/* *  Sets the strings of the subwidgets using the current *  language. */void carborn_Form::languageChange(){    setCaption( tr( "the terminel of carcarborn" ) );    numButton1->setText( tr( "1" ) );    numButton2->setText( tr( "2" ) );    numButton3->setText( tr( "3" ) );    numButton4->setText( tr( "4" ) );    numButton5->setText( tr( "5" ) );    numButton6->setText( tr( "6" ) );    numButton7->setText( tr( "7" ) );    numButton8->setText( tr( "8" ) );    numButton9->setText( tr( "9" ) );    numButton0->setText( tr( "0" ) );    numButton12->setText( tr( "#" ) );    numButton11->setText( tr( "*" ) );    passtext->setText( tr( "<h1><p align=\"center\">Welcome to Home !!</p></h1>" ) );    groupBox2->setTitle( tr( "Identity Recognize" ) );    submitButton->setText( tr( "submit" ) );    resetButton->setText( tr( "reset" ) );    groupBox1->setTitle( tr( "Guest Visit" ) );    visitButton->setText( tr( "Call the host" ) );    closedoorButton->setText( tr( "close the door" ) );}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -