www.pudn.com > hobby_cpp.rar > sigcreatedlg.cpp
#include/**************************************************************************** ** Form implementation generated from reading ui file '/root/myhome/cpp/sigcreate-0.100/src/sigcreatedlg.ui' ** ** Created: 日 6月 5 03:49:34 2005 ** by: The User Interface Compiler ($Id: qt/main.cpp 3.3.3 edited Nov 24 2003 $) ** ** WARNING! All changes made in this file will be lost! ****************************************************************************/ #include "sigcreatedlg.h" #include #include #include #include #include #include #include #include #include #include #include #include "/root/myhome/cpp/sigcreate-0.100/src/sigcreatedlg.ui.h" /* * Constructs a SigCreateDlg as a child of 'parent', with the * name 'name' and widget flags set to 'f'. */ SigCreateDlg::SigCreateDlg( QWidget* parent, const char* name, WFlags fl ) : QWidget( parent, name, fl ) { if ( !name ) setName( "SigCreateDlg" ); buttonGroup1 = new QButtonGroup( this, "buttonGroup1" ); buttonGroup1->setGeometry( QRect( 11, 11, 270, 290 ) ); commBox1 = new QComboBox( FALSE, buttonGroup1, "commBox1" ); commBox1->setGeometry( QRect( 134, 175, 114, 27 ) ); commBox2 = new QComboBox( FALSE, buttonGroup1, "commBox2" ); commBox2->setGeometry( QRect( 134, 208, 114, 27 ) ); commBox3 = new QComboBox( FALSE, buttonGroup1, "commBox3" ); commBox3->setGeometry( QRect( 134, 241, 114, 27 ) ); textLabel3_2 = new QLabel( buttonGroup1, "textLabel3_2" ); textLabel3_2->setGeometry( QRect( 12, 84, 101, 19 ) ); lineEdit2 = new QLineEdit( buttonGroup1, "lineEdit2" ); lineEdit2->setGeometry( QRect( 119, 55, 129, 19 ) ); textLabel5_2 = new QLabel( buttonGroup1, "textLabel5_2" ); textLabel5_2->setGeometry( QRect( 12, 142, 101, 19 ) ); lineEdit5 = new QLineEdit( buttonGroup1, "lineEdit5" ); lineEdit5->setGeometry( QRect( 119, 142, 129, 19 ) ); textLabel1 = new QLabel( buttonGroup1, "textLabel1" ); textLabel1->setGeometry( QRect( 12, 26, 101, 19 ) ); textLabel4_2 = new QLabel( buttonGroup1, "textLabel4_2" ); textLabel4_2->setGeometry( QRect( 12, 113, 101, 19 ) ); lineEdit4 = new QLineEdit( buttonGroup1, "lineEdit4" ); lineEdit4->setGeometry( QRect( 119, 113, 129, 19 ) ); lineEdit3 = new QLineEdit( buttonGroup1, "lineEdit3" ); lineEdit3->setGeometry( QRect( 119, 84, 129, 19 ) ); lineEdit1 = new QLineEdit( buttonGroup1, "lineEdit1" ); lineEdit1->setGeometry( QRect( 119, 26, 129, 19 ) ); textLabel2_2 = new QLabel( buttonGroup1, "textLabel2_2" ); textLabel2_2->setGeometry( QRect( 12, 55, 101, 19 ) ); textLabel6 = new QLabel( buttonGroup1, "textLabel6" ); textLabel6->setGeometry( QRect( 12, 175, 114, 27 ) ); textLabel7 = new QLabel( buttonGroup1, "textLabel7" ); textLabel7->setGeometry( QRect( 12, 208, 114, 27 ) ); textLabel8 = new QLabel( buttonGroup1, "textLabel8" ); textLabel8->setGeometry( QRect( 12, 241, 114, 27 ) ); buttonGroup3 = new QButtonGroup( this, "buttonGroup3" ); buttonGroup3->setGeometry( QRect( 290, 430, 390, 150 ) ); createButton = new QPushButton( buttonGroup3, "createButton" ); createButton->setGeometry( QRect( 291, 31, 76, 26 ) ); tryButton = new QPushButton( buttonGroup3, "tryButton" ); tryButton->setGeometry( QRect( 291, 63, 76, 26 ) ); cancelButton = new QPushButton( buttonGroup3, "cancelButton" ); cancelButton->setGeometry( QRect( 291, 95, 76, 26 ) ); textLabel1_2 = new QLabel( buttonGroup3, "textLabel1_2" ); textLabel1_2->setGeometry( QRect( 12, 22, 129, 27 ) ); textLabel15 = new QLabel( buttonGroup3, "textLabel15" ); textLabel15->setGeometry( QRect( 12, 57, 137, 19 ) ); lineEdit12 = new QLineEdit( buttonGroup3, "lineEdit12" ); lineEdit12->setGeometry( QRect( 155, 107, 121, 19 ) ); textLabel17 = new QLabel( buttonGroup3, "textLabel17" ); textLabel17->setGeometry( QRect( 12, 107, 137, 19 ) ); lineEdit11 = new QLineEdit( buttonGroup3, "lineEdit11" ); lineEdit11->setGeometry( QRect( 155, 82, 121, 19 ) ); textLabel16 = new QLabel( buttonGroup3, "textLabel16" ); textLabel16->setGeometry( QRect( 12, 82, 137, 19 ) ); lineEdit10 = new QLineEdit( buttonGroup3, "lineEdit10" ); lineEdit10->setGeometry( QRect( 155, 57, 121, 19 ) ); commBox = new QComboBox( FALSE, buttonGroup3, "commBox" ); commBox->setGeometry( QRect( 156, 22, 120, 27 ) ); buttonGroup2 = new QButtonGroup( this, "buttonGroup2" ); buttonGroup2->setGeometry( QRect( 10, 300, 270, 280 ) ); sigBox = new QTextEdit( buttonGroup2, "sigBox" ); sigBox->setGeometry( QRect( 10, 190, 250, 80 ) ); textLabel14 = new QLabel( buttonGroup2, "textLabel14" ); textLabel14->setGeometry( QRect( 12, 157, 120, 27 ) ); textLabel13 = new QLabel( buttonGroup2, "textLabel13" ); textLabel13->setGeometry( QRect( 12, 124, 120, 27 ) ); commBox5 = new QComboBox( FALSE, buttonGroup2, "commBox5" ); commBox5->setGeometry( QRect( 138, 157, 120, 27 ) ); commBox4 = new QComboBox( FALSE, buttonGroup2, "commBox4" ); commBox4->setGeometry( QRect( 138, 124, 120, 27 ) ); lineEdit7 = new QLineEdit( buttonGroup2, "lineEdit7" ); lineEdit7->setGeometry( QRect( 115, 46, 144, 19 ) ); textLabel11 = new QLabel( buttonGroup2, "textLabel11" ); textLabel11->setGeometry( QRect( 11, 71, 98, 19 ) ); lineEdit8 = new QLineEdit( buttonGroup2, "lineEdit8" ); lineEdit8->setGeometry( QRect( 115, 71, 144, 19 ) ); lineEdit6 = new QLineEdit( buttonGroup2, "lineEdit6" ); lineEdit6->setGeometry( QRect( 115, 21, 144, 19 ) ); textLabel12 = new QLabel( buttonGroup2, "textLabel12" ); textLabel12->setGeometry( QRect( 11, 96, 98, 19 ) ); textLabel9 = new QLabel( buttonGroup2, "textLabel9" ); textLabel9->setGeometry( QRect( 11, 46, 98, 19 ) ); lineEdit9 = new QLineEdit( buttonGroup2, "lineEdit9" ); lineEdit9->setGeometry( QRect( 115, 96, 144, 19 ) ); textLabel10 = new QLabel( buttonGroup2, "textLabel10" ); textLabel10->setGeometry( QRect( 11, 21, 98, 19 ) ); table1 = new QTable( this, "table1" ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "(°)" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "S/mm" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "V/(mm/s)" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "a/(mm/s^2)" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "X/mm" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "Y/mm" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "X1/mm" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "Y1/mm" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "X2/mm" ) ); table1->setNumCols( table1->numCols() + 1 ); table1->horizontalHeader()->setLabel( table1->numCols() - 1, tr2i18n( "Y2/mm" ) ); table1->setGeometry( QRect( 290, 311, 390, 120 ) ); table1->setNumRows( 181 ); table1->setNumCols( 10 ); languageChange(); resize( QSize(687, 582).expandedTo(minimumSizeHint()) ); clearWState( WState_Polished ); // signals and slots connections connect( createButton, SIGNAL( clicked() ), this, SLOT( slotCreateSig() ) ); connect( cancelButton, SIGNAL( clicked() ), this, SLOT( close() ) ); connect( tryButton, SIGNAL( clicked() ), this, SLOT( slotTry() ) ); } /* * Destroys the object and frees any allocated resources */ SigCreateDlg::~SigCreateDlg() { // no need to delete child widgets, Qt does it all for us } /* * Sets the strings of the subwidgets using the current * language. */ void SigCreateDlg::languageChange() { setCaption( tr2i18n( "SigCreateDlg v.01" ) ); buttonGroup1->setTitle( tr2i18n( "凸轮参数" ) ); commBox1->clear(); commBox1->insertItem( tr2i18n( "逆时针" ) ); commBox1->insertItem( tr2i18n( "顺时针" ) ); commBox2->clear(); commBox2->insertItem( tr2i18n( "x轴正侧" ) ); commBox2->insertItem( tr2i18n( "x轴负侧" ) ); commBox2->insertItem( tr2i18n( "与Y轴重合" ) ); commBox3->clear(); commBox3->insertItem( tr2i18n( "外凸轮" ) ); commBox3->insertItem( tr2i18n( "内凸轮" ) ); textLabel3_2->setText( tr2i18n( "滚子半径" ) ); textLabel5_2->setText( tr2i18n( "最大位移" ) ); textLabel1->setText( tr2i18n( "角速度/(rad/s)" ) ); textLabel4_2->setText( tr2i18n( "偏距" ) ); textLabel2_2->setText( tr2i18n( "基圆半径/mm" ) ); textLabel6->setText( tr2i18n( "偏置系数" ) ); textLabel7->setText( tr2i18n( "转向系数" ) ); textLabel8->setText( tr2i18n( "内外凸轮" ) ); buttonGroup3->setTitle( tr2i18n( "校核参数" ) ); createButton->setText( tr2i18n( "运算" ) ); tryButton->setText( tr2i18n( "图形输出" ) ); cancelButton->setText( tr2i18n( "退出" ) ); textLabel1_2->setText( tr2i18n( "图形输出" ) ); textLabel15->setText( tr2i18n( "推程许用压力角/(°)" ) ); textLabel17->setText( tr2i18n( "许用曲率半径/mm" ) ); textLabel16->setText( tr2i18n( "回程许用压力角/(°)" ) ); commBox->clear(); commBox->insertItem( tr2i18n( "请先择" ) ); commBox->insertItem( tr2i18n( "结构模型" ) ); commBox->insertItem( tr2i18n( "运动线图" ) ); commBox->insertItem( tr2i18n( "轮廓显示" ) ); commBox->insertItem( tr2i18n( "动态仿真" ) ); buttonGroup2->setTitle( tr2i18n( "运行参数" ) ); textLabel14->setText( tr2i18n( "回程运动方式" ) ); textLabel13->setText( tr2i18n( "推程运动方式" ) ); commBox5->clear(); commBox5->insertItem( tr2i18n( "等速运动" ) ); commBox5->insertItem( tr2i18n( "等加速、等减速" ) ); commBox5->insertItem( tr2i18n( "摆线运动" ) ); commBox5->insertItem( tr2i18n( "简谐运动" ) ); commBox5->insertItem( tr2i18n( "五次多项式运动" ) ); commBox4->clear(); commBox4->insertItem( tr2i18n( "等速运动" ) ); commBox4->insertItem( tr2i18n( "等加速、等减速" ) ); commBox4->insertItem( tr2i18n( "摆线运动" ) ); commBox4->insertItem( tr2i18n( "简谐运动" ) ); commBox4->insertItem( tr2i18n( "五次多项式运动" ) ); textLabel11->setText( tr2i18n( "远休止角/(°)" ) ); textLabel12->setText( tr2i18n( "回程角度/(°)" ) ); textLabel9->setText( tr2i18n( "推程角度/(°)" ) ); textLabel10->setText( tr2i18n( "起始角度/(°)" ) ); table1->horizontalHeader()->setLabel( 0, tr2i18n( "(°)" ) ); table1->horizontalHeader()->setLabel( 1, tr2i18n( "S/mm" ) ); table1->horizontalHeader()->setLabel( 2, tr2i18n( "V/(mm/s)" ) ); table1->horizontalHeader()->setLabel( 3, tr2i18n( "a/(mm/s^2)" ) ); table1->horizontalHeader()->setLabel( 4, tr2i18n( "X/mm" ) ); table1->horizontalHeader()->setLabel( 5, tr2i18n( "Y/mm" ) ); table1->horizontalHeader()->setLabel( 6, tr2i18n( "X1/mm" ) ); table1->horizontalHeader()->setLabel( 7, tr2i18n( "Y1/mm" ) ); table1->horizontalHeader()->setLabel( 8, tr2i18n( "X2/mm" ) ); table1->horizontalHeader()->setLabel( 9, tr2i18n( "Y2/mm" ) ); } #include "sigcreatedlg.moc"