0608c更新

main
zhangxuxutm 2 years ago
parent 455341d626
commit 5d17fd45c2

@ -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);
}

@ -72,9 +72,7 @@ public:
verticalLayout->setObjectName(QString::fromUtf8("verticalLayout"));
stateBox = new QComboBox(MonitorTag);
stateBox->setEditable(true);
stateBox->lineEdit()->setAlignment(Qt::AlignCenter);
QStringList options = {"远程模式", "待机等风", "停机维护", "启动"};
QStringList options = {" 远程模式", " 待机等风", " 停机维护", " 启动"};
stateBox->addItems(options);

@ -35,6 +35,13 @@ QLabel{
color: #DDDDE9;
font-family: Microsoft YaHei;
font-weight: bold;
font-size: 18px;
}
QLabel#nameLabel{
font-size: 20px;
}
@ -78,6 +85,20 @@ QPushButton#monitorButton, QPushButton#flangeButton, QPushButton#clearanceButton
}
QPushButton#monitorButton:checked, QPushButton#flangeButton:checked, QPushButton#clearanceButton:checked, QPushButton#gyroscopeButton:checked{
color: white;
background-color: rgba(16,68,105, 80%);;
border-radius: 5px;
border: 3px solid;
border-color: #ffffff;
height: 30px;
font-family: Microsoft YaHei;
font-weight: bold;
font-size: 20px;
}
QPushButton#normalButton, QPushButton#standbyButton, QPushButton#hutdownButton, QPushButton#failureButton, QPushButton#runButton, QPushButton#interruptedButton{
background-color: rgba(16,68,105, 80%);
@ -91,6 +112,25 @@ QPushButton#normalButton, QPushButton#standbyButton, QPushButton#hutdownButton,
}
QPushButton#normalButton:hover, QPushButton#standbyButton:hover, QPushButton#hutdownButton:hover, QPushButton#failureButton:hover, QPushButton#runButton:hover, QPushButton#interruptedButton:hover{
color: #2277EF;
background-color: #F7F7F7;
solid #2277EF;
}
QPushButton#normalButton:checked, QPushButton#standbyButton:checked, QPushButton#hutdownButton:checked, QPushButton#failureButton:checked, QPushButton#runButton:checked, QPushButton#interruptedButton:checked{
background-color: #F5F5F6;
color: #2277EF;
solid #2277EF;
}
QListView#deviceList, QListView#flangeList{
border: 3px solid;

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 528 B

Loading…
Cancel
Save