0607更新c

main
zhangxuxutm 2 years ago
parent 816749e1ff
commit 0b6093cf25

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

@ -16,5 +16,8 @@
<file>Static/headNormal.png</file>
<file>Static/fanInterrupted.png</file>
<file>Static/userPic.png</file>
<file>Static/windPic.png</file>
<file>Static/Sliding.png</file>
<file>Static/down.png</file>
</qresource>
</RCC>

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

@ -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()

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

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

After

Width:  |  Height:  |  Size: 625 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

After

Width:  |  Height:  |  Size: 324 B

Loading…
Cancel
Save