diff --git a/CMakeLists.txt b/CMakeLists.txt
index d235a46..64e6ec3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,7 @@ set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
#定义两个变量,表示头文件路径和库路径
-set(OPENSSL_ROOT_DIR "F:/OpenSSL-Win64")
+set(OPENSSL_ROOT_DIR "D:/openssl/OpenSSL-Win64")
set(OPENSSL_INCLUDE_DIR "${OPENSSL_ROOT_DIR}/include")
set(OPENSSL_LIB_DIR "${OPENSSL_ROOT_DIR}/lib")
find_package(OpenSSL REQUIRED)
diff --git a/DAM.qrc b/DAM.qrc
index cb19834..327b293 100644
--- a/DAM.qrc
+++ b/DAM.qrc
@@ -16,5 +16,8 @@
Static/headNormal.png
Static/fanInterrupted.png
Static/userPic.png
+ Static/windPic.png
+ Static/Sliding.png
+ Static/down.png
diff --git a/MainWindow.h b/MainWindow.h
index 79ec69d..b035d0e 100644
--- a/MainWindow.h
+++ b/MainWindow.h
@@ -56,7 +56,8 @@ public:
titleWidget->setObjectName(QString::fromUtf8("titleWidget"));
horizontalLayout = new QHBoxLayout(titleWidget);
horizontalLayout->setObjectName(QString::fromUtf8("horizontalLayout"));
- horizontalLayout->setContentsMargins(0, 0, 0, 0);
+ horizontalLayout->setContentsMargins(0, 0, 10, 20);
+ horizontalLayout->setSpacing(10);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
horizontalLayout->addItem(horizontalSpacer);
diff --git a/MonitorUI/MonitorUI.h b/MonitorUI/MonitorUI.h
index c121219..570b408 100644
--- a/MonitorUI/MonitorUI.h
+++ b/MonitorUI/MonitorUI.h
@@ -27,7 +27,7 @@ class MonitorWidget:public QWidget
public:
QVBoxLayout *verticalLayout;
QHBoxLayout *operationLayout;
- QPushButton *exchangeButton;
+// QPushButton *exchangeButton;
QSpacerItem *horizontalSpacer;
QGridLayout *monitorLayout;
QHBoxLayout *filterlLayout;
@@ -54,17 +54,17 @@ public:
verticalLayout->setContentsMargins(0, 0, 0, 0);
operationLayout = new QHBoxLayout();
operationLayout->setObjectName(QString::fromUtf8("operationLayout"));
- exchangeButton = new QPushButton(MonitorWidget);
- exchangeButton->setObjectName(QString::fromUtf8("exchangeButton"));
+// exchangeButton = new QPushButton(MonitorWidget);
+// exchangeButton->setObjectName(QString::fromUtf8("exchangeButton"));
- operationLayout->addWidget(exchangeButton);
+// operationLayout->addWidget(exchangeButton);
horizontalSpacer = new QSpacerItem(40, 20, QSizePolicy::Expanding, QSizePolicy::Minimum);
operationLayout->addItem(horizontalSpacer);
- verticalLayout->addLayout(operationLayout);
+// verticalLayout->addLayout(operationLayout);
monitorLayout = new QGridLayout();
monitorLayout->setObjectName(QString::fromUtf8("monitorLayout"));
@@ -79,7 +79,8 @@ public:
monitorLayout->setColumnStretch(6, 1);
fillWidget = new QWidget();
fillWidget->setLayout(monitorLayout);
- connect(exchangeButton, &QPushButton::clicked, this, [=](){this->changeState();});
+ fillWidget->setObjectName(QString::fromUtf8("fillWidget"));
+// connect(exchangeButton, &QPushButton::clicked, this, [=](){this->changeState();});
QScrollArea *scrollArea = new QScrollArea();
@@ -88,6 +89,7 @@ public:
scrollArea->setWidgetResizable(true);
scrollArea->setHorizontalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
scrollArea->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOn);
+ scrollArea->setObjectName(QString::fromUtf8("scrollArea"));
verticalLayout->addWidget(scrollArea);
@@ -129,8 +131,8 @@ public:
runButton->setIcon(QIcon(":/Static/fanRun.png"));
filterlLayout->addWidget(runButton);
- filterlLayout->setContentsMargins(10, 10, 10, 10);
- filterlLayout->setSpacing(20);
+ filterlLayout->setContentsMargins(30, 10, 30, 30);
+ filterlLayout->setSpacing(50);
verticalLayout->addLayout(filterlLayout);
@@ -151,14 +153,14 @@ public:
});
timer->start(5000);
- connect(exchangeButton, &QPushButton::clicked, this, [=](){this->exchangeClicked();});
+// connect(exchangeButton, &QPushButton::clicked, this, [=](){this->exchangeClicked();});
} // setupUi
void retranslateUi(QWidget *MonitorWidget)
{
MonitorWidget->setWindowTitle(QCoreApplication::translate("MonitorWidget", "Form", nullptr));
- exchangeButton->setText(QCoreApplication::translate("MonitorWidget", "\345\244\247\345\260\217\345\233\276\346\240\207\345\210\207\346\215\242", nullptr));
+// exchangeButton->setText(QCoreApplication::translate("MonitorWidget", "\345\244\247\345\260\217\345\233\276\346\240\207\345\210\207\346\215\242", nullptr));
} // retranslateUi
void exchangeClicked()
@@ -234,6 +236,8 @@ public:
monitorLayout->setRowStretch(1, 1);
monitorLayout->setRowStretch(2, 1);
monitorLayout->setRowStretch(3, 1);
+ }else{
+ fillWidget->setFixedHeight(228 * ceil(allFans.size() / 4));
}
fillWidget->setFixedWidth(1900);
setButtonMes();
@@ -243,12 +247,12 @@ public:
}
void setButtonMes(){
- interruptedButton->setText(QString("通讯中断") + QString::number(fans.interruptedFans.size()));
- normalButton->setText(QString("正常运行") + QString::number(fans.normalFans.size()));
- standbyButton->setText(QString("待机等风") + QString::number(fans.standbyFans.size()));
- hutdownButton->setText(QString("停机维护") + QString::number(fans.hutdownFans.size()));
- failureButton->setText(QString("故障停机") + QString::number(fans.interruptedFans.size()));
- runButton->setText(QString("启动") + QString::number(fans.runFans.size()));
+ interruptedButton->setText(QString("通讯中断 ") + QString::number(fans.interruptedFans.size()));
+ normalButton->setText(QString("正常运行 ") + QString::number(fans.normalFans.size()));
+ standbyButton->setText(QString("待机等风 ") + QString::number(fans.standbyFans.size()));
+ hutdownButton->setText(QString("停机维护 ") + QString::number(fans.hutdownFans.size()));
+ failureButton->setText(QString("故障停机 ") + QString::number(fans.interruptedFans.size()));
+ runButton->setText(QString("启动 ") + QString::number(fans.runFans.size()));
}
MonitorWidget()
diff --git a/Static/DamQSS.Qss b/Static/DamQSS.Qss
index 0428ba8..80b7807 100644
--- a/Static/DamQSS.Qss
+++ b/Static/DamQSS.Qss
@@ -1,3 +1,10 @@
+QMainWindow#MainWindow{
+
+ background-image: url(:/Static/windPic.png);
+ background-color: rgba(0, 0, 0, 128);
+
+}
+
QWidget#MonitorTag{
background-color: #374065;
@@ -15,36 +22,71 @@ QWidget#filterWidget{
}
+QWidget#scrollArea, QWidget#fillWidget{
+
+ background-color: transparent;
+ border: none;
+
+}
+
+
QLabel{
color: #DDDDE9;
+ font-family: Microsoft YaHei;
+ font-weight: bold;
+
+}
+
+QComboBox{
+
+ font-family: Microsoft YaHei;
+ font-weight: bold;
+ border: none;
+ background-color: transparent;
+
+}
+QComboBox::drop-down{
+ subcontrol-origin: padding;
+ subcontrol-position: top right;
+ width: 25px;
+ border:none;
+ image: url(:/Static/down.png)
}
-QPushButton#ClearanceButton, QPushButton#FlangeButton, QPushButton#GyroscopeButton{
+QPushButton#ClearanceButton, QPushButton#FlangeButton, QPushButton#GyroscopeButton, QPushButton#minButton, QPushButton#closeButton{
-border: none;
+ border: none;
+ font-family: Microsoft YaHei;
+ font-weight: bold;
}
QPushButton#monitorButton, QPushButton#flangeButton, QPushButton#clearanceButton, QPushButton#gyroscopeButton{
color: white;
- background-color: #104469;
+ background-color: rgba(16,68,105, 80%);
border-radius: 5px;
border: 3px solid;
border-color: #115C8E;
- height: 30px
+ 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: #133852;
+ background-color: rgba(16,68,105, 80%);
color: white;
- height: 28px;
+ height: 35px;
border: none;
- border-radius: 1px;
+ border-radius: 5px;
+ font-family: Microsoft YaHei;
+ font-weight: bold;
+ font-size: 20px;
}
@@ -57,3 +99,67 @@ QListView#deviceList, QListView#flangeList{
border-color: #175E88;
}
+
+
+
+
+QGridLayout#monitorLayout{
+
+ background-color: #214055;
+
+
+}
+
+QScrollBar::vertical{
+
+ width:10px;
+ background:rgba(37,85,105,100%);
+ padding-top:9px;
+ padding-bottom:9px;
+
+
+}
+
+QScrollBar::handle:vertical{
+
+ width:20px;
+ border-image:url(:/Static/Sliding.png);
+ margin:0px,0px,0px,0px;
+
+}
+
+QScrollBar::handle:vertical:hover{
+
+ width:18px;
+ background:rgba(69, 178, 255,100%);
+ border-radius:4px;
+ min-height:20;
+
+}
+
+
+QScrollBar::add-line:vertical{
+
+ height:0px;
+ width:18px;
+ subcontrol-position:bottom;
+ background:rgba(69, 178, 255,100%);
+
+}
+
+QScrollBar::sub-line:vertical{
+
+ height:0px;
+ width:18px;
+ subcontrol-position:top;
+ background:rgba(69, 178, 255,100%);
+
+}
+
+QScrollBar::add-page:vertical,QScrollBar::sub-page:vertical{
+
+
+ background:rgba(37,85,105,100%);
+
+}
+
diff --git a/Static/close.png b/Static/close.png
index eb176a0..e411130 100644
Binary files a/Static/close.png and b/Static/close.png differ
diff --git a/Static/min.png b/Static/min.png
index 58099d1..8923208 100644
Binary files a/Static/min.png and b/Static/min.png differ