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

📄 newdialog.cpp

📁 使用 C++ 写的人事管理系统
💻 CPP
字号:
/****************************************************************************** Form implementation generated from reading ui file '.\newdialog.ui'**** Created: 星期三 十二月 31 12:45:21 2003**      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 "newdialog.h"#include <qvariant.h>#include <qpushbutton.h>#include <qgroupbox.h>#include <qlabel.h>#include <qcombobox.h>#include <qspinbox.h>#include <qlineedit.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include "newdialog.ui.h"/*  *  Constructs a NewDialogBase 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. */NewDialogBase::NewDialogBase( QWidget* parent, const char* name, bool modal, WFlags fl )    : QDialog( parent, name, modal, fl ){    if ( !name )	setName( "NewDialogBase" );    setSizeGripEnabled( TRUE );    QWidget* privateLayoutWidget = new QWidget( this, "Layout1" );    privateLayoutWidget->setGeometry( QRect( 20, 200, 460, 33 ) );    Layout1 = new QHBoxLayout( privateLayoutWidget, 0, 6, "Layout1");     buttonHelp = new QPushButton( privateLayoutWidget, "buttonHelp" );    buttonHelp->setAutoDefault( TRUE );    Layout1->addWidget( buttonHelp );    QSpacerItem* spacer = new QSpacerItem( 20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum );    Layout1->addItem( spacer );    buttonOk = new QPushButton( privateLayoutWidget, "buttonOk" );    buttonOk->setAutoDefault( TRUE );    buttonOk->setDefault( TRUE );    Layout1->addWidget( buttonOk );    buttonCancel = new QPushButton( privateLayoutWidget, "buttonCancel" );    buttonCancel->setAutoDefault( TRUE );    Layout1->addWidget( buttonCancel );    groupBox1 = new QGroupBox( this, "groupBox1" );    groupBox1->setGeometry( QRect( 20, 10, 460, 170 ) );    textLabel1 = new QLabel( groupBox1, "textLabel1" );    textLabel1->setGeometry( QRect( 20, 20, 40, 21 ) );    textLabel1_2 = new QLabel( groupBox1, "textLabel1_2" );    textLabel1_2->setGeometry( QRect( 259, 20, 40, 21 ) );    textLabel1_3 = new QLabel( groupBox1, "textLabel1_3" );    textLabel1_3->setGeometry( QRect( 20, 50, 40, 21 ) );    textLabel1_5 = new QLabel( groupBox1, "textLabel1_5" );    textLabel1_5->setGeometry( QRect( 20, 90, 54, 21 ) );    textLabel1_4 = new QLabel( groupBox1, "textLabel1_4" );    textLabel1_4->setGeometry( QRect( 260, 90, 40, 21 ) );    textLabel1_5_2 = new QLabel( groupBox1, "textLabel1_5_2" );    textLabel1_5_2->setGeometry( QRect( 20, 120, 40, 21 ) );    textLabel1_4_2 = new QLabel( groupBox1, "textLabel1_4_2" );    textLabel1_4_2->setGeometry( QRect( 260, 120, 40, 21 ) );    nd_sex = new QComboBox( FALSE, groupBox1, "nd_sex" );    nd_sex->setGeometry( QRect( 310, 20, 121, 21 ) );    nd_age = new QSpinBox( groupBox1, "nd_age" );    nd_age->setGeometry( QRect( 70, 50, 161, 21 ) );    nd_age->setMaxValue( 99 );    nd_name = new QLineEdit( groupBox1, "nd_name" );    nd_name->setGeometry( QRect( 70, 20, 160, 21 ) );    nd_name->setMaxLength( 20 );    nd_company = new QLineEdit( groupBox1, "nd_company" );    nd_company->setGeometry( QRect( 70, 90, 160, 21 ) );    nd_company->setMaxLength( 200 );    nd_job = new QLineEdit( groupBox1, "nd_job" );    nd_job->setGeometry( QRect( 310, 90, 120, 21 ) );    nd_job->setMaxLength( 200 );    nd_phone = new QLineEdit( groupBox1, "nd_phone" );    nd_phone->setGeometry( QRect( 70, 120, 160, 21 ) );    nd_phone->setMaxLength( 200 );    nd_address = new QLineEdit( groupBox1, "nd_address" );    nd_address->setGeometry( QRect( 310, 120, 120, 21 ) );    nd_address->setMaxLength( 200 );    languageChange();    resize( QSize(503, 250).expandedTo(minimumSizeHint()) );    clearWState( WState_Polished );    // signals and slots connections    connect( buttonOk, SIGNAL( clicked() ), this, SLOT( accept() ) );    connect( buttonCancel, SIGNAL( clicked() ), this, SLOT( reject() ) );    connect( buttonHelp, SIGNAL( clicked() ), this, SLOT( buttonHelp_clicked() ) );}/* *  Destroys the object and frees any allocated resources */NewDialogBase::~NewDialogBase(){    // no need to delete child widgets, Qt does it all for us}/* *  Sets the strings of the subwidgets using the current *  language. */void NewDialogBase::languageChange(){    setCaption( trUtf8( "新增记录" ) );    buttonHelp->setText( trUtf8( "帮助(&H)" ) );    buttonOk->setCaption( QString::null );    buttonOk->setText( trUtf8( "确定(&O)" ) );    buttonCancel->setText( trUtf8( "取消(&C)" ) );    groupBox1->setTitle( QString::null );    textLabel1->setText( trUtf8( "姓名" ) );    textLabel1_2->setText( trUtf8( "性别" ) );    textLabel1_3->setText( trUtf8( "年龄" ) );    textLabel1_5->setText( trUtf8( "工作单位" ) );    textLabel1_4->setText( trUtf8( "职务" ) );    textLabel1_5_2->setText( trUtf8( "电话" ) );    textLabel1_4_2->setText( trUtf8( "住址" ) );    nd_sex->clear();    nd_sex->insertItem( trUtf8( "(男)" ) );    nd_sex->insertItem( trUtf8( "(女)" ) );}

⌨️ 快捷键说明

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