From 5d17fd45c29cba8c354a4ac921f1044e20850991 Mon Sep 17 00:00:00 2001 From: zhangxuxutm <951937200@qq.com> Date: Thu, 8 Jun 2023 16:33:35 +0800 Subject: [PATCH] =?UTF-8?q?0608c=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainWindow.h | 35 ++++++++++++++++++++++++++++------ MonitorUI/MonitorTagUI.h | 4 +--- Static/DamQSS.Qss | 40 +++++++++++++++++++++++++++++++++++++++ Static/down.png | Bin 3858 -> 528 bytes 4 files changed, 70 insertions(+), 9 deletions(-) diff --git a/MainWindow.h b/MainWindow.h index 9682185..b57fe37 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -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); } diff --git a/MonitorUI/MonitorTagUI.h b/MonitorUI/MonitorTagUI.h index b1e8363..af8b0eb 100644 --- a/MonitorUI/MonitorTagUI.h +++ b/MonitorUI/MonitorTagUI.h @@ -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); diff --git a/Static/DamQSS.Qss b/Static/DamQSS.Qss index 6f285cd..2fd49ee 100644 --- a/Static/DamQSS.Qss +++ b/Static/DamQSS.Qss @@ -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; diff --git a/Static/down.png b/Static/down.png index f0e4f6bfdb6bcd4e6fee149190b834a3e1a342d4..f9cbf60ff320442357be06d79b6bc5830b19a9ac 100644 GIT binary patch literal 528 zcmV+r0`L8aP)Px$%1J~)RCr$PnbB>-AP|OuEr1tilXQ}*leFC=ouug|c`DB%zMb*`NAgOu{}OhSx+=_X)mRl*v)bMBw0UN%kfV~oG zz!w(~E1?!VihvCXC(gOwXbIa`;q5&7eLfVV{zmTyq+TG@{kN&IGAEEDkt3elN%YU@y5`$_5UB5S$eTRN4z)1c8olY_Mh*?|AStNp!fypY8V=Z=dvM ziFId_rEt?4VR2>+ zk}*>_uO$o>%%wxf7>U>2KVKG}o*iP%5F1EEq}t~7<({&=;jF9oh>~r z0RepkNYGscWTt%v?WqAqKnf2+&`^#5G*B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