/****************************************************************************
** Form implementation generated from reading ui file 'form1.ui'
**
** Created: 三 8月 27 13:59:48 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 "form1.h"
#include <qvariant.h>
#include <qcombobox.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qlineedit.h>
#include <qpushbutton.h>
#include <qlayout.h>
#include <qtooltip.h>
#include <qwhatsthis.h>
#include <qimage.h>
#include <qpixmap.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" );
comboBox1 = new QComboBox( FALSE, this, "comboBox1" );
comboBox1->setGeometry( QRect( 80, 10, 71, 20 ) );
comboBox2 = new QComboBox( FALSE, this, "comboBox2" );
comboBox2->setGeometry( QRect( 160, 10, 70, 21 ) );
pushButton2 = new QPushButton( this, "pushButton2" );
pushButton2->setGeometry( QRect( 250, 10, 71, 31 ) );
pushButton3 = new QPushButton( this, "pushButton3" );
pushButton3->setGeometry( QRect( 330, 10, 71, 31 ) );
groupBox1 = new QGroupBox( this, "groupBox1" );
groupBox1->setGeometry( QRect( 10, 40, 390, 260 ) );
pushButton5 = new QPushButton( groupBox1, "pushButton5" );
pushButton5->setGeometry( QRect( 150, 20, 70, 31 ) );
pushButton6 = new QPushButton( groupBox1, "pushButton6" );
pushButton6->setGeometry( QRect( 230, 20, 70, 31 ) );
pushButton7 = new QPushButton( groupBox1, "pushButton7" );
pushButton7->setGeometry( QRect( 310, 20, 70, 31 ) );
lineEdit2 = new QLineEdit( groupBox1, "lineEdit2" );
lineEdit2->setGeometry( QRect( 10, 60, 371, 190 ) );
pushButton4 = new QPushButton( groupBox1, "pushButton4" );
pushButton4->setGeometry( QRect( 70, 20, 71, 30 ) );
lineEdit1 = new QLineEdit( groupBox1, "lineEdit1" );
lineEdit1->setGeometry( QRect( 10, 20, 51, 22 ) );
textLabel1 = new QLabel( this, "textLabel1" );
textLabel1->setGeometry( QRect( 10, 310, 60, 31 ) );
textLabel2 = new QLabel( this, "textLabel2" );
textLabel2->setGeometry( QRect( 210, 310, 71, 31 ) );
pushButton1 = new QPushButton( this, "pushButton1" );
pushButton1->setGeometry( QRect( 10, 10, 41, 31 ) );
lineEdit3 = new QLineEdit( this, "lineEdit3" );
lineEdit3->setGeometry( QRect( 80, 310, 111, 31 ) );
lineEdit4 = new QLineEdit( this, "lineEdit4" );
lineEdit4->setGeometry( QRect( 290, 310, 110, 31 ) );
languageChange();
resize( QSize(418, 350).expandedTo(minimumSizeHint()) );
}
/*
* 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( "GSMTest" ) );
comboBox1->clear();
comboBox1->insertItem( tr( "COM1" ) );
comboBox1->insertItem( tr( "COM2" ) );
comboBox1->insertItem( tr( "COM3" ) );
comboBox2->clear();
comboBox2->insertItem( tr( "2400" ) );
comboBox2->insertItem( tr( "4800" ) );
comboBox2->insertItem( tr( "9600" ) );
comboBox2->insertItem( tr( "19200" ) );
comboBox2->insertItem( tr( "38400" ) );
comboBox2->insertItem( tr( "57600" ) );
comboBox2->insertItem( tr( "115200" ) );
pushButton2->setText( tr( "open" ) );
pushButton3->setText( tr( "close" ) );
groupBox1->setTitle( tr( "Message Box" ) );
pushButton5->setText( tr( "Send" ) );
pushButton6->setText( tr( "Delete" ) );
pushButton7->setText( tr( "Clear" ) );
pushButton4->setText( tr( "Read" ) );
textLabel1->setText( tr( "Phone Num:" ) );
textLabel2->setText( tr( "Server Num:" ) );
pushButton1->setText( QString::null );
lineEdit3->setText( tr( "13812345678" ) );
lineEdit4->setText( tr( "13800210500" ) );
}
- 1
- 2
- 3
前往页