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

📄 form1.cpp

📁 向嵌入式linux操作系统中
💻 CPP
字号:
/****************************************************************************** Form implementation generated from reading ui file 'form1.ui'**** Created: 六  5月 27 17:15:09 2006**      by: The User Interface Compiler ($Id: qt/main.cpp   3.1.2   edited Dec 19 11:45 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "form1.h"#include <qvariant.h>#include <qlineedit.h>#include <qlabel.h>#include <qpushbutton.h>#include <qspinbox.h>#include <qslider.h>#include <qradiobutton.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "form1.ui.h"/*  *  Constructs a Form1 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. */Form1::Form1( QWidget* parent, const char* name, bool modal, WFlags fl )    : QDialog( parent, name, modal, fl ){    if ( !name )	setName( "Form1" );    QFont f( font() );    f.setFamily( "Sans" );    setFont( f );     lineEdit1 = new QLineEdit( this, "lineEdit1" );    lineEdit1->setGeometry( QRect( 230, 270, 200, 24 ) );    lineEdit1->setReadOnly( TRUE );    textLabel4 = new QLabel( this, "textLabel4" );    textLabel4->setGeometry( QRect( 210, 40, 33, 20 ) );    QFont textLabel4_font(  textLabel4->font() );    textLabel4->setFont( textLabel4_font );     textLabel3 = new QLabel( this, "textLabel3" );    textLabel3->setGeometry( QRect( 20, 40, 35, 20 ) );    QFont textLabel3_font(  textLabel3->font() );    textLabel3->setFont( textLabel3_font );     textLabel7 = new QLabel( this, "textLabel7" );    textLabel7->setGeometry( QRect( 240, 80, 93, 20 ) );    QFont textLabel7_font(  textLabel7->font() );    textLabel7->setFont( textLabel7_font );     pushButton2 = new QPushButton( this, "pushButton2" );    pushButton2->setGeometry( QRect( 360, 360, 80, 30 ) );    QFont pushButton2_font(  pushButton2->font() );    pushButton2->setFont( pushButton2_font );     textLabel2_2 = new QLabel( this, "textLabel2_2" );    textLabel2_2->setGeometry( QRect( 300, 20, 16, 20 ) );    QFont textLabel2_2_font(  textLabel2_2->font() );    textLabel2_2_font.setPointSize( 12 );    textLabel2_2->setFont( textLabel2_2_font );     pushButton3 = new QPushButton( this, "pushButton3" );    pushButton3->setGeometry( QRect( 230, 360, 120, 30 ) );    QFont pushButton3_font(  pushButton3->font() );    pushButton3->setFont( pushButton3_font );     textLabel7_2 = new QLabel( this, "textLabel7_2" );    textLabel7_2->setGeometry( QRect( 20, 80, 43, 20 ) );    QFont textLabel7_2_font(  textLabel7_2->font() );    textLabel7_2->setFont( textLabel7_2_font );     textLabel1 = new QLabel( this, "textLabel1" );    textLabel1->setGeometry( QRect( 70, 0, 60, 20 ) );    QFont textLabel1_font(  textLabel1->font() );    textLabel1->setFont( textLabel1_font );     pushButtonStartorStop = new QPushButton( this, "pushButtonStartorStop" );    pushButtonStartorStop->setGeometry( QRect( 320, 10, 120, 40 ) );    QFont pushButtonStartorStop_font(  pushButtonStartorStop->font() );    pushButtonStartorStop->setFont( pushButtonStartorStop_font );     spinBox3 = new QSpinBox( this, "spinBox3" );    spinBox3->setGeometry( QRect( 250, 20, 40, 21 ) );    spinBox3->setMaxValue( 23 );    spinBox3->setMinValue( 1 );    spinBox3->setValue( 3 );    slider1 = new QSlider( this, "slider1" );    slider1->setGeometry( QRect( 10, 20, 230, 20 ) );    slider1->setMaxValue( 22 );    slider1->setLineStep( 1 );    slider1->setValue( 2 );    slider1->setOrientation( QSlider::Horizontal );    lineEditTime = new QLineEdit( this, "lineEditTime" );    lineEditTime->setGeometry( QRect( 20, 270, 190, 24 ) );    lineEditTime->setReadOnly( TRUE );    textLabel1_2 = new QLabel( this, "textLabel1_2" );    textLabel1_2->setGeometry( QRect( 20, 250, 40, 20 ) );    radioButtondis = new QRadioButton( this, "radioButtondis" );    radioButtondis->setGeometry( QRect( 240, 310, 140, 20 ) );    QFont radioButtondis_font(  radioButtondis->font() );    radioButtondis->setFont( radioButtondis_font );     languageChange();    resize( QSize(453, 400).expandedTo(minimumSizeHint()) );    clearWState( WState_Polished );    // signals and slots connections    connect( pushButtonStartorStop, SIGNAL( clicked() ), this, SLOT( StartorStop() ) );    connect( pushButton2, SIGNAL( clicked() ), this, SLOT( close() ) );    connect( pushButton3, SIGNAL( clicked() ), this, SLOT( delimages() ) );    connect( slider1, SIGNAL( valueChanged(int) ), this, SLOT( spinboxchange() ) );    connect( spinBox3, SIGNAL( valueChanged(int) ), this, SLOT( spliderchange() ) );    // tab order    setTabOrder( pushButtonStartorStop, slider1 );    setTabOrder( slider1, spinBox3 );    setTabOrder( spinBox3, radioButtondis );    setTabOrder( radioButtondis, pushButton3 );    setTabOrder( pushButton3, pushButton2 );    setTabOrder( pushButton2, lineEdit1 );    setTabOrder( lineEdit1, lineEditTime );    init();}/* *  Destroys the object and frees any allocated resources */Form1::~Form1(){    // no need to delete child widgets, Qt does it all for us}/* *  Sets the strings of the subwidgets using the current *  language. */void Form1::languageChange(){    setCaption( tr( "Monitor" ) );    textLabel4->setText( tr( "Low" ) );    textLabel3->setText( tr( "High" ) );    textLabel7->setText( tr( "Different display" ) );    pushButton2->setText( tr( "&Quit" ) );    QWhatsThis::add( pushButton2, QString::null );    textLabel2_2->setText( tr( "%" ) );    pushButton3->setText( tr( "&Delete all" ) );    textLabel7_2->setText( tr( "Monitor" ) );    textLabel1->setText( tr( "sensitivity" ) );    pushButtonStartorStop->setText( tr( "&Start Monitor" ) );    textLabel1_2->setText( tr( "Time" ) );    radioButtondis->setText( tr( "&Only display person" ) );}

⌨️ 快捷键说明

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