test.cpp
资源名称:GUI.rar [点击查看]
上传用户:jiangfa
上传日期:2022-05-14
资源大小:1651k
文件大小:2k
源码类别:
GDI/图象编程
开发平台:
Unix_Linux
- /****************************************************************************
- ** Form implementation generated from reading ui file 'test.ui'
- **
- ** Created: 日 6月 25 20:58:58 2006
- ** 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 "test.h"
- #include <qvariant.h>
- #include <qpushbutton.h>
- #include <qlayout.h>
- #include <qtooltip.h>
- #include <qwhatsthis.h>
- #include <qimage.h>
- #include <qpixmap.h>
- /*
- * Constructs a test 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.
- */
- test::test( QWidget* parent, const char* name, bool modal, WFlags fl )
- : QDialog( parent, name, modal, fl )
- {
- if ( !name )
- setName( "test" );
- btnOk = new QPushButton( this, "btnOk" );
- btnOk->setGeometry( QRect( 80, 210, 60, 30 ) );
- btnExit = new QPushButton( this, "btnExit" );
- btnExit->setGeometry( QRect( 170, 210, 70, 31 ) );
- languageChange();
- resize( QSize(351, 285).expandedTo(minimumSizeHint()) );
- }
- /*
- * Destroys the object and frees any allocated resources
- */
- test::~test()
- {
- // no need to delete child widgets, Qt does it all for us
- }
- /*
- * Sets the strings of the subwidgets using the current
- * language.
- */
- void test::languageChange()
- {
- setCaption( tr( "test" ) );
- btnOk->setText( tr( "&Ok" ) );
- btnExit->setText( tr( "E&xit" ) );
- }