📄 addstudentform.cpp
字号:
/****************************************************************************** Form implementation generated from reading ui file 'AddStudentform.ui'**** Created: 星期三 六月 27 06:04:47 2007** by: The User Interface Compiler ()**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "AddStudentform.h"#include <qvariant.h>#include <qlabel.h>#include <qpushbutton.h>#include <qlineedit.h>#include <qcombobox.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "AddStudentform.ui.h"/* * Constructs a Form2 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. */Form2::Form2( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ){ if ( !name ) setName( "Form2" ); setIcon( QPixmap::fromMimeSource( "ADD.png" ) ); textLabel3 = new QLabel( this, "textLabel3" ); textLabel3->setGeometry( QRect( 30, 80, 63, 20 ) ); QFont textLabel3_font( textLabel3->font() ); textLabel3_font.setPointSize( 11 ); textLabel3->setFont( textLabel3_font ); textLabel4 = new QLabel( this, "textLabel4" ); textLabel4->setGeometry( QRect( 30, 110, 63, 20 ) ); QFont textLabel4_font( textLabel4->font() ); textLabel4_font.setPointSize( 11 ); textLabel4->setFont( textLabel4_font ); pushButton18 = new QPushButton( this, "pushButton18" ); pushButton18->setGeometry( QRect( 290, 150, 92, 27 ) ); textLabel1 = new QLabel( this, "textLabel1" ); textLabel1->setGeometry( QRect( 30, 20, 63, 20 ) ); QFont textLabel1_font( textLabel1->font() ); textLabel1_font.setPointSize( 11 ); textLabel1->setFont( textLabel1_font ); lineEdit1 = new QLineEdit( this, "lineEdit1" ); lineEdit1->setGeometry( QRect( 130, 20, 250, 21 ) ); lineEdit1->setFrameShape( QLineEdit::LineEditPanel ); lineEdit1->setFrameShadow( QLineEdit::Sunken ); lineEdit2 = new QLineEdit( this, "lineEdit2" ); lineEdit2->setGeometry( QRect( 130, 50, 250, 21 ) ); lineEdit3 = new QLineEdit( this, "lineEdit3" ); lineEdit3->setGeometry( QRect( 130, 80, 250, 21 ) ); comboBox1 = new QComboBox( FALSE, this, "comboBox1" ); comboBox1->setGeometry( QRect( 130, 110, 85, 21 ) ); pushButton17 = new QPushButton( this, "pushButton17" ); pushButton17->setGeometry( QRect( 90, 150, 92, 27 ) ); pushButton88 = new QPushButton( this, "pushButton88" ); pushButton88->setGeometry( QRect( 190, 150, 92, 27 ) ); textLabel2 = new QLabel( this, "textLabel2" ); textLabel2->setGeometry( QRect( 30, 50, 63, 20 ) ); QFont textLabel2_font( textLabel2->font() ); textLabel2_font.setPointSize( 11 ); textLabel2->setFont( textLabel2_font ); languageChange(); resize( QSize(400, 193).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( pushButton18, SIGNAL( clicked() ), this, SLOT( close() ) ); connect( pushButton17, SIGNAL( clicked() ), this, SLOT( Add() ) ); connect( pushButton88, SIGNAL( clicked() ), this, SLOT( Add() ) );}/* * Destroys the object and frees any allocated resources */Form2::~Form2(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void Form2::languageChange(){ setCaption( tr( "ADD" ) ); textLabel3->setText( tr( "age" ) ); textLabel4->setText( tr( "sex" ) ); pushButton18->setText( tr( "Cancel" ) ); textLabel1->setText( tr( "NAME" ) ); comboBox1->clear(); comboBox1->insertItem( tr( "Male" ) ); comboBox1->insertItem( tr( "Female" ) ); pushButton17->setText( tr( "ADD" ) ); pushButton88->setText( tr( "Modify" ) ); textLabel2->setText( tr( "ID" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -