📄 addcylinderform.cpp
字号:
/****************************************************************************** Form implementation generated from reading ui file 'addcylinderform.ui'**** Created: Sun Aug 29 22:07:04 2004** by: The User Interface Compiler ($Id: qt/main.cpp 3.2.3 edited May 19 14:22 $)**** WARNING! All changes made in this file will be lost!****************************************************************************/#include "addcylinderform.h"#include <qvariant.h>#include <qpushbutton.h>#include <qlabel.h>#include <qlineedit.h>#include <qcombobox.h>#include <qgroupbox.h>#include <qlayout.h>#include <qtooltip.h>#include <qwhatsthis.h>#include <qimage.h>#include <qpixmap.h>#include "addcylinderform.ui.h"/* * Constructs a AddCylinderForm 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. */AddCylinderForm::AddCylinderForm( QWidget* parent, const char* name, bool modal, WFlags fl ) : QDialog( parent, name, modal, fl ){ if ( !name ) setName( "AddCylinderForm" ); AddCylinderFormLayout = new QGridLayout( this, 1, 1, 11, 6, "AddCylinderFormLayout"); layout53 = new QVBoxLayout( 0, 0, 6, "layout53"); layout44 = new QHBoxLayout( 0, 0, 6, "layout44"); textLabel4_2 = new QLabel( this, "textLabel4_2" ); layout44->addWidget( textLabel4_2 ); nameLineEdit = new QLineEdit( this, "nameLineEdit" ); layout44->addWidget( nameLineEdit ); QSpacerItem* spacer = new QSpacerItem( 150, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout44->addItem( spacer ); layout53->addLayout( layout44 ); layout45 = new QHBoxLayout( 0, 0, 6, "layout45"); textLabel4 = new QLabel( this, "textLabel4" ); layout45->addWidget( textLabel4 ); materialcomboBox = new QComboBox( FALSE, this, "materialcomboBox" ); layout45->addWidget( materialcomboBox ); QSpacerItem* spacer_2 = new QSpacerItem( 338, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout45->addItem( spacer_2 ); layout53->addLayout( layout45 ); layout49 = new QHBoxLayout( 0, 0, 6, "layout49"); groupBox6 = new QGroupBox( this, "groupBox6" ); groupBox6->setColumnLayout(0, Qt::Vertical ); groupBox6->layout()->setSpacing( 6 ); groupBox6->layout()->setMargin( 11 ); groupBox6Layout = new QGridLayout( groupBox6->layout() ); groupBox6Layout->setAlignment( Qt::AlignTop ); layout37 = new QHBoxLayout( 0, 0, 6, "layout37"); layout36 = new QVBoxLayout( 0, 0, 6, "layout36"); textLabel3 = new QLabel( groupBox6, "textLabel3" ); layout36->addWidget( textLabel3 ); textLabel3_2 = new QLabel( groupBox6, "textLabel3_2" ); layout36->addWidget( textLabel3_2 ); textLabel3_2_2 = new QLabel( groupBox6, "textLabel3_2_2" ); layout36->addWidget( textLabel3_2_2 ); layout37->addLayout( layout36 ); layout35 = new QVBoxLayout( 0, 0, 6, "layout35"); cylinderCenterXLineEdit = new QLineEdit( groupBox6, "cylinderCenterXLineEdit" ); layout35->addWidget( cylinderCenterXLineEdit ); cylinderCenterYLineEdit = new QLineEdit( groupBox6, "cylinderCenterYLineEdit" ); layout35->addWidget( cylinderCenterYLineEdit ); cylinderCenterZLineEdit = new QLineEdit( groupBox6, "cylinderCenterZLineEdit" ); layout35->addWidget( cylinderCenterZLineEdit ); layout37->addLayout( layout35 ); groupBox6Layout->addLayout( layout37, 0, 0 ); layout49->addWidget( groupBox6 ); groupBox14 = new QGroupBox( this, "groupBox14" ); groupBox14->setColumnLayout(0, Qt::Vertical ); groupBox14->layout()->setSpacing( 6 ); groupBox14->layout()->setMargin( 11 ); groupBox14Layout = new QGridLayout( groupBox14->layout() ); groupBox14Layout->setAlignment( Qt::AlignTop ); layout48 = new QHBoxLayout( 0, 0, 6, "layout48"); layout47 = new QVBoxLayout( 0, 0, 6, "layout47"); textLabel1 = new QLabel( groupBox14, "textLabel1" ); layout47->addWidget( textLabel1 ); textLabel1_2 = new QLabel( groupBox14, "textLabel1_2" ); layout47->addWidget( textLabel1_2 ); textLabel1_2_2 = new QLabel( groupBox14, "textLabel1_2_2" ); layout47->addWidget( textLabel1_2_2 ); textLabel1_2_2_2 = new QLabel( groupBox14, "textLabel1_2_2_2" ); layout47->addWidget( textLabel1_2_2_2 ); layout48->addLayout( layout47 ); layout46 = new QVBoxLayout( 0, 0, 6, "layout46"); radiusLineEdit = new QLineEdit( groupBox14, "radiusLineEdit" ); layout46->addWidget( radiusLineEdit ); heightLineEdit = new QLineEdit( groupBox14, "heightLineEdit" ); layout46->addWidget( heightLineEdit ); phiLineEdit = new QLineEdit( groupBox14, "phiLineEdit" ); layout46->addWidget( phiLineEdit ); thetaLineEdit = new QLineEdit( groupBox14, "thetaLineEdit" ); layout46->addWidget( thetaLineEdit ); layout48->addLayout( layout46 ); groupBox14Layout->addLayout( layout48, 0, 0 ); layout49->addWidget( groupBox14 ); layout53->addLayout( layout49 ); QSpacerItem* spacer_3 = new QSpacerItem( 20, 50, QSizePolicy::Minimum, QSizePolicy::Expanding ); layout53->addItem( spacer_3 ); layout50 = new QHBoxLayout( 0, 0, 6, "layout50"); OKPushButton = new QPushButton( this, "OKPushButton" ); layout50->addWidget( OKPushButton ); QSpacerItem* spacer_4 = new QSpacerItem( 120, 20, QSizePolicy::Expanding, QSizePolicy::Minimum ); layout50->addItem( spacer_4 ); cancelPushButton = new QPushButton( this, "cancelPushButton" ); layout50->addWidget( cancelPushButton ); layout53->addLayout( layout50 ); AddCylinderFormLayout->addLayout( layout53, 0, 0 ); languageChange(); resize( QSize(471, 320).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( OKPushButton, SIGNAL( clicked() ), this, SLOT( OKSlot() ) ); connect( cancelPushButton, SIGNAL( clicked() ), this, SLOT( CancelSlot() ) );}/* * Destroys the object and frees any allocated resources */AddCylinderForm::~AddCylinderForm(){ // no need to delete child widgets, Qt does it all for us}/* * Sets the strings of the subwidgets using the current * language. */void AddCylinderForm::languageChange(){ setCaption( tr( "Add Cylinder" ) ); textLabel4_2->setText( tr( "Name" ) ); textLabel4->setText( tr( "Material" ) ); materialcomboBox->clear(); materialcomboBox->insertItem( tr( "0" ) ); materialcomboBox->insertItem( tr( "1" ) ); groupBox6->setTitle( tr( "Center [Cells]" ) ); textLabel3->setText( tr( "X" ) ); textLabel3_2->setText( tr( "Y" ) ); textLabel3_2_2->setText( tr( "Z" ) ); groupBox14->setTitle( tr( "Dimensions" ) ); textLabel1->setText( tr( "Radius [m]" ) ); textLabel1_2->setText( tr( "Height [m]" ) ); textLabel1_2_2->setText( tr( "Phi [deg]" ) ); textLabel1_2_2_2->setText( tr( "Theta [deg]" ) ); OKPushButton->setText( tr( "OK" ) ); cancelPushButton->setText( tr( "Cancel" ) );}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -