diff --git a/AnalyticUI/ClearanceAnalyticUI.h b/AnalyticUI/ClearanceAnalyticUI.h index a7a989d..bbf8bae 100644 --- a/AnalyticUI/ClearanceAnalyticUI.h +++ b/AnalyticUI/ClearanceAnalyticUI.h @@ -1,4 +1,4 @@ -#ifndef CLEARANCEANALYTICUI_20_NGNFZD_H +#ifndef CLEARANCEANALYTICUI_20_NGNFZD_H #define CLEARANCEANALYTICUI_20_NGNFZD_H #include @@ -164,6 +164,7 @@ public: // 修改QStandardItem对象的文本和图标 item->setText(it->first); +// qDebug()<second; item->setIcon(getDevIcon(it->second)); count++; } diff --git a/AnalyticUI/FlangeAnalyticUI.h b/AnalyticUI/FlangeAnalyticUI.h index 00d0819..7d5c5e8 100644 --- a/AnalyticUI/FlangeAnalyticUI.h +++ b/AnalyticUI/FlangeAnalyticUI.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** ** Form generated from reading UI file 'FlangeAnalyticUILTsZHk.ui' ** ** Created by: Qt User Interface Compiler version 5.14.2 diff --git a/AnalyticUI/GyroscopeAnalyticUI.h b/AnalyticUI/GyroscopeAnalyticUI.h index 0289a7e..2322bb4 100644 --- a/AnalyticUI/GyroscopeAnalyticUI.h +++ b/AnalyticUI/GyroscopeAnalyticUI.h @@ -1,4 +1,4 @@ -/******************************************************************************** +/******************************************************************************** ** Form generated from reading UI file 'GyroscopeAnalyticUI NxkAxt.ui' ** ** Created by: Qt User Interface Compiler version 5.14.2 diff --git a/HTTPClient/client.h b/HTTPClient/client.h index 5484e10..c4d2883 100644 --- a/HTTPClient/client.h +++ b/HTTPClient/client.h @@ -96,6 +96,8 @@ private: string flangeIndex; public: + int curFanId; + QString curFlangeId; httplib::Client client; HTTPClient(); void getFanList(); diff --git a/MainWindow.h b/MainWindow.h index 7352813..98b6ed5 100644 --- a/MainWindow.h +++ b/MainWindow.h @@ -38,6 +38,7 @@ public: ClearanceAnalyticWidget *clearancePage; FlangeAnalyticWidget* flangePage; GyroscopeAnalyticWidget *gyroscopePage; + QTimer *curTimer; @@ -162,6 +163,8 @@ public: // ?????????? MainWindow->setWindowFlags(Qt::FramelessWindowHint); + curTimer = monitorPage->viewTimer; + QMetaObject::connectSlotsByName(MainWindow); } // setupUi @@ -173,10 +176,10 @@ public: clearanceButton->setText(QString("净空区域")); gyroscopeButton->setText(QString("陀螺仪监测")); - 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, [=](){curTimer->stop(); curTimer = monitorPage->viewTimer; curTimer->start(2500); this->stackedWidget->setCurrentIndex(0); }); + connect(flangeButton, &QPushButton::clicked, this, [=](){curTimer->stop(); curTimer = flangePage->timer; curTimer->start(2500); this->stackedWidget->setCurrentIndex(1); }); + connect(clearanceButton, &QPushButton::clicked, this, [=](){curTimer->stop(); curTimer = clearancePage->timer; curTimer->start(2500); this->stackedWidget->setCurrentIndex(2); }); + connect(gyroscopeButton, &QPushButton::clicked, this, [=](){curTimer->stop(); curTimer = gyroscopePage->timer; curTimer->start(2500); this->stackedWidget->setCurrentIndex(3); }); // connect(flangeButton, &QPushButton::clicked, this, [=](){this->flangePage->addDevice(); }); // connect(clearanceButton, &QPushButton::clicked, this, [=](){this->clearancePage->addDevice(); }); diff --git a/MonitorUI/MonitorUI.h b/MonitorUI/MonitorUI.h index 5ddafbf..b4f386d 100644 --- a/MonitorUI/MonitorUI.h +++ b/MonitorUI/MonitorUI.h @@ -1,4 +1,4 @@ - + #ifndef MONITOROVOZEZ_H #define MONITOROVOZEZ_H @@ -19,6 +19,7 @@ #include "MonitorTagUI.h" #include "../HTTPClient/client.h" +#pragma execution_character_set("utf-8") QT_BEGIN_NAMESPACE diff --git a/main.cpp b/main.cpp index 9647012..fdc216c 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,4 @@ - + #include "MainWindow.h" #include "./LoginUI/Login.h" #include @@ -13,7 +13,7 @@ int main(int argc, char *argv[]) QFile styleFile(":/Static/DamQSS.Qss"); styleFile.open(QFile::ReadOnly); QString styleSheet = QLatin1String(styleFile.readAll()); - qDebug() << styleSheet; +// qDebug() << styleSheet; app.setStyleSheet(styleSheet); MainWindow w;