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

📄 form1.cpp

📁 这是一个嵌入式linux的GUI源码comdemo.tar.gz 一个QT/Embedded 的控件功能演示源码
💻 CPP
字号:
/****************************************************************************** Form implementation generated from reading ui file 'demo1.ui'**** Created: Sat Jun 26 17:29:45 2004**      by:  The User Interface Compiler (uic)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "form1.h"#include "form2.h"#include "form3.h"#include <qbuttongroup.h>#include <qcheckbox.h>#include <qframe.h>#include <qlabel.h>#include <qlineedit.h>#include <qpushbutton.h>#include <qradiobutton.h>#include <qspinbox.h>#include <qtabwidget.h>#include <qlayout.h>#include <qvariant.h>#include <qtooltip.h>#include <qwhatsthis.h>/*  *  Constructs a Form1 which is a child of 'parent', with the  *  name 'name' and widget flags set to 'f'  */Form1::Form1( QWidget* parent,  const char* name, WFlags fl )    : QWidget( parent, name, fl ){    if ( !name )	setName( "Form1" );    resize( 240, 320 );     setMaximumSize( QSize( 240, 320 ) );    setCaption( tr( "Qt Components Demo-ucdragon" ) );    Frame3 = new QFrame( this, "Frame3" );    Frame3->setGeometry( QRect( 4, 3, 223, 250 ) );     Frame3->setFrameShape( QFrame::StyledPanel );    Frame3->setFrameShadow( QFrame::Raised );    CheckBox1 = new QCheckBox( Frame3, "CheckBox1" );    CheckBox1->setGeometry( QRect( 100, 13, 111, 20 ) );     CheckBox1->setText( tr( "CheckBox1" ) );    TextLabel1 = new QLabel( Frame3, "TextLabel1" );    TextLabel1->setGeometry( QRect( 20, 13, 50, 21 ) );     TextLabel1->setText( tr( "Label1" ) );    SpinBox1 = new QSpinBox( Frame3, "SpinBox1" );    SpinBox1->setGeometry( QRect( 20, 40, 190, 30 ) );     ButtonGroup1 = new QButtonGroup( Frame3, "ButtonGroup1" );    ButtonGroup1->setGeometry( QRect( 20, 80, 190, 71 ) );     ButtonGroup1->setTitle( tr( "ButtonGroup1" ) );    RadioButton2 = new QRadioButton( ButtonGroup1, "RadioButton2" );    RadioButton2->setGeometry( QRect( 20, 46, 116, 20 ) );     RadioButton2->setText( tr( "RadioButton2" ) );    RadioButton1 = new QRadioButton( ButtonGroup1, "RadioButton1" );    RadioButton1->setGeometry( QRect( 20, 20, 135, 20 ) );     RadioButton1->setText( tr( "RadioButton1" ) );    TabWidget2 = new QTabWidget( Frame3, "TabWidget2" );    TabWidget2->setGeometry( QRect( 20, 160, 191, 80 ) );     tab = new QWidget( TabWidget2, "tab" );    LineEdit1 = new QLineEdit( tab, "LineEdit1" );    LineEdit1->setGeometry( QRect( 8, 10, 171, 25 ) );     TabWidget2->insertTab( tab, tr( "Tab 1" ) );    tab_2 = new QWidget( TabWidget2, "tab_2" );    TabWidget2->insertTab( tab_2, tr( "Tab 2" ) );    PushButton6 = new QPushButton( this, "PushButton6" );    PushButton6->setGeometry( QRect( 130, 270, 80, 30 ) );     PushButton6->setText( tr( "Next >>" ) );    PushButton1 = new QPushButton( this, "PushButton1" );    PushButton1->setGeometry( QRect( 30, 270, 80, 30 ) );     PushButton1->setMaximumSize( QSize( 240, 320 ) );    PushButton1->setText( tr( "OK(&O)" ) );    connect( PushButton6, SIGNAL(clicked()), this, SLOT(shownext()) );    connect( PushButton1, SIGNAL(clicked()), this, SLOT(close()) );    LineEdit1->setText("this is Line Edit");    SpinBox1->setValue(25);    WFlags f2;    f2 = fl&(!Qt::WStyle_SysMenu);    f2 = Qt::WStyle_Customize | Qt::WStyle_ContextHelp;    m_fm2 = new Form2(0, "Form2" , f2);    m_fm3 = new Form3(0, "Form3" , f2);    m_fm2->setFormPtr(this, m_fm3);    m_fm3->setFormPtr(this, m_fm2);   }/*   *  Destroys the object and frees any allocated resources */Form1::~Form1(){  delete   m_fm2;  delete   m_fm3;}void Form1::shownext(){	hide();	m_fm2->show();}

⌨️ 快捷键说明

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