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

📄 mainform.cpp

📁 在Linux底下用QtDesigner开发的一个进程同步例子。基本思想是设计一个缓冲区(循环队列)
💻 CPP
字号:
/****************************************************************************** Form implementation generated from reading ui file 'mainForm.ui'**** Created: 三  5月 16 16:38:28 2007**      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 "mainForm.h"#include <qvariant.h>#include <qlabel.h>#include <qlineedit.h>#include <qpushbutton.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qaction.h>#include <qmenubar.h>#include <qpopupmenu.h>#include <qtoolbar.h>#include <qimage.h>#include <qpixmap.h>#include "../mainForm.ui.h"/*  *  Constructs a mainForm as a child of 'parent', with the  *  name 'name' and widget flags set to 'f'. * */mainForm::mainForm( QWidget* parent, const char* name, WFlags fl )    : QMainWindow( parent, name, fl ){    (void)statusBar();    if ( !name )	setName( "mainForm" );    setCentralWidget( new QWidget( this, "qt_central_widget" ) );    pushButton4 = new QPushButton( centralWidget(), "pushButton4" );    pushButton4->setGeometry( QRect( 260, 290, 76, 29 ) );    textLabel3 = new QLabel( centralWidget(), "textLabel3" );    textLabel3->setGeometry( QRect( 10, 240, 60, 20 ) );    pushButton3 = new QPushButton( centralWidget(), "pushButton3" );    pushButton3->setGeometry( QRect( 90, 290, 76, 29 ) );    textLabel2 = new QLabel( centralWidget(), "textLabel2" );    textLabel2->setGeometry( QRect( 0, 190, 60, 20 ) );    textLabel1 = new QLabel( centralWidget(), "textLabel1" );    textLabel1->setGeometry( QRect( 0, 140, 60, 20 ) );    lineEdit5 = new QLineEdit( centralWidget(), "lineEdit5" );    lineEdit5->setGeometry( QRect( 240, 190, 108, 22 ) );    lineEdit6 = new QLineEdit( centralWidget(), "lineEdit6" );    lineEdit6->setGeometry( QRect( 240, 240, 108, 22 ) );    lineEdit2 = new QLineEdit( centralWidget(), "lineEdit2" );    lineEdit2->setGeometry( QRect( 80, 190, 108, 22 ) );    lineEdit3 = new QLineEdit( centralWidget(), "lineEdit3" );    lineEdit3->setGeometry( QRect( 80, 240, 108, 22 ) );    lineEdit4 = new QLineEdit( centralWidget(), "lineEdit4" );    lineEdit4->setGeometry( QRect( 240, 140, 108, 22 ) );    lineEdit1 = new QLineEdit( centralWidget(), "lineEdit1" );    lineEdit1->setGeometry( QRect( 80, 140, 108, 22 ) );    // toolbars    languageChange();    resize( QSize(426, 421).expandedTo(minimumSizeHint()) );    // signals and slots connections    connect( pushButton3, SIGNAL( clicked() ), this, SLOT( addSlot() ) );    connect( pushButton4, SIGNAL( clicked() ), this, SLOT( GetSlot() ) );}/* *  Destroys the object and frees any allocated resources */mainForm::~mainForm(){    // no need to delete child widgets, Qt does it all for us}/* *  Sets the strings of the subwidgets using the current *  language. */void mainForm::languageChange(){    setCaption( tr( "Form1" ) );    pushButton4->setText( tr( "Get" ) );    textLabel3->setText( tr( "Radius" ) );    pushButton3->setText( tr( "Add" ) );    textLabel2->setText( tr( "Y location" ) );    textLabel1->setText( tr( "X location" ) );}

⌨️ 快捷键说明

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