|
|
|
@ -138,10 +138,7 @@ public:
|
|
|
|
|
setButtonMes();
|
|
|
|
|
|
|
|
|
|
// 设置按钮点击跳转窗口
|
|
|
|
|
connect(monitorButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(0); });
|
|
|
|
|
connect(flangeButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(1); });
|
|
|
|
|
connect(clearanceButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(2); });
|
|
|
|
|
connect(gyroscopeButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(3); });
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
connect(closeButton, &QPushButton::clicked, MainWindow, &QMainWindow::close);
|
|
|
|
|
|
|
|
|
@ -154,14 +151,40 @@ public:
|
|
|
|
|
|
|
|
|
|
void setButtonMes()
|
|
|
|
|
{
|
|
|
|
|
minButton->setText(QString());
|
|
|
|
|
closeButton->setText(QString());
|
|
|
|
|
monitorButton->setText(u8"监 控 总 览");
|
|
|
|
|
flangeButton->setText(u8"法 兰 分 析");
|
|
|
|
|
clearanceButton->setText(u8"净 空 分 析");
|
|
|
|
|
gyroscopeButton->setText(u8"陀 螺 仪 监 测");
|
|
|
|
|
|
|
|
|
|
connect(monitorButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(0); });
|
|
|
|
|
connect(flangeButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(1); });
|
|
|
|
|
connect(clearanceButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(2); });
|
|
|
|
|
connect(gyroscopeButton, &QPushButton::clicked, this, [=](){this->stackedWidget->setCurrentIndex(3); });
|
|
|
|
|
|
|
|
|
|
connect(monitorButton, &QPushButton::clicked, this, [=](){this->clearButton();});
|
|
|
|
|
connect(flangeButton, &QPushButton::clicked, this, [=](){this->clearButton();});
|
|
|
|
|
connect(clearanceButton, &QPushButton::clicked, this, [=](){this->clearButton();});
|
|
|
|
|
connect(gyroscopeButton, &QPushButton::clicked, this, [=](){this->clearButton();});
|
|
|
|
|
connect(monitorButton, &QPushButton::clicked, this, [=](){monitorButton->setChecked(true);});
|
|
|
|
|
connect(flangeButton, &QPushButton::clicked, this, [=](){flangeButton->setChecked(true);});
|
|
|
|
|
connect(clearanceButton, &QPushButton::clicked, this, [=](){clearanceButton->setChecked(true);});
|
|
|
|
|
connect(gyroscopeButton, &QPushButton::clicked, this, [=](){gyroscopeButton->setChecked(true);});
|
|
|
|
|
|
|
|
|
|
monitorButton->setCheckable(true);
|
|
|
|
|
flangeButton->setCheckable(true);
|
|
|
|
|
clearanceButton->setCheckable(true);
|
|
|
|
|
gyroscopeButton->setCheckable(true);
|
|
|
|
|
|
|
|
|
|
monitorButton->setChecked(true);
|
|
|
|
|
} // retranslateUi
|
|
|
|
|
|
|
|
|
|
void clearButton(){
|
|
|
|
|
monitorButton->setChecked(false);
|
|
|
|
|
flangeButton->setChecked(false);
|
|
|
|
|
clearanceButton->setChecked(false);
|
|
|
|
|
gyroscopeButton->setChecked(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
MainWindow(){
|
|
|
|
|
this->setupUi(this);
|
|
|
|
|
}
|
|
|
|
|