From a9606ff58acb7aeaa9e93bd3b832d219898913d9 Mon Sep 17 00:00:00 2001 From: JasonYANG170 Date: Thu, 9 May 2024 11:00:07 +0800 Subject: [PATCH] up new code --- .env | 0 IOT.pro | 41 +++ IOT.pro.user | 271 +++++++++++++++ IOT_zh_CN.ts | 3 + README.md | 1 + dialog.cpp | 269 +++++++++++++++ dialog.h | 44 +++ dialog.ui | 242 ++++++++++++++ dialog2.cpp | 75 +++++ dialog2.h | 25 ++ dialog2.ui | 65 ++++ form.cpp | 98 ++++++ form.h | 29 ++ form.ui | 163 +++++++++ lib/Qt6Mqtt.prl | 3 + .../StandaloneTests/QtMqttTestsConfig.cmake | 8 + .../Qt6Mqtt/Qt6MqttAdditionalTargetInfo.cmake | 48 +++ lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake | 177 ++++++++++ lib/cmake/Qt6Mqtt/Qt6MqttConfigVersion.cmake | 68 ++++ .../Qt6Mqtt/Qt6MqttConfigVersionImpl.cmake | 43 +++ lib/cmake/Qt6Mqtt/Qt6MqttDependencies.cmake | 46 +++ lib/cmake/Qt6Mqtt/Qt6MqttTargets.cmake | 100 ++++++ .../Qt6MqttVersionlessAliasTargets.cmake | 7 + .../Qt6Mqtt/Qt6MqttVersionlessTargets.cmake | 7 + lib/libQt6Mqtt.a | Bin 0 -> 254740 bytes lib/pkgconfig/Qt6Mqtt.pc | 12 + ...reliminary_pc_for_Qt6Mqtt_Release_step2.pc | 14 + .../preliminary_pc_for_Qt6Mqtt_step1.pc | 14 + main.cpp | 25 ++ mainwindow.cpp | 312 ++++++++++++++++++ mainwindow.h | 39 +++ mainwindow.ui | 135 ++++++++ 32 files changed, 2384 insertions(+) create mode 100644 .env create mode 100644 IOT.pro create mode 100644 IOT.pro.user create mode 100644 IOT_zh_CN.ts create mode 100644 README.md create mode 100644 dialog.cpp create mode 100644 dialog.h create mode 100644 dialog.ui create mode 100644 dialog2.cpp create mode 100644 dialog2.h create mode 100644 dialog2.ui create mode 100644 form.cpp create mode 100644 form.h create mode 100644 form.ui create mode 100644 lib/Qt6Mqtt.prl create mode 100644 lib/cmake/Qt6BuildInternals/StandaloneTests/QtMqttTestsConfig.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttAdditionalTargetInfo.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttConfigVersion.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttConfigVersionImpl.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttDependencies.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttTargets.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttVersionlessAliasTargets.cmake create mode 100644 lib/cmake/Qt6Mqtt/Qt6MqttVersionlessTargets.cmake create mode 100644 lib/libQt6Mqtt.a create mode 100644 lib/pkgconfig/Qt6Mqtt.pc create mode 100644 lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_Release_step2.pc create mode 100644 lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_step1.pc create mode 100644 main.cpp create mode 100644 mainwindow.cpp create mode 100644 mainwindow.h create mode 100644 mainwindow.ui diff --git a/.env b/.env new file mode 100644 index 0000000..e69de29 diff --git a/IOT.pro b/IOT.pro new file mode 100644 index 0000000..bdd4c29 --- /dev/null +++ b/IOT.pro @@ -0,0 +1,41 @@ +QT += core gui +QT += mqtt +greaterThan(QT_MAJOR_VERSION, 4): QT += widgets + +CONFIG += c++17 + +# You can make your code fail to compile if it uses deprecated APIs. +# In order to do so, uncomment the following line. +#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 + +SOURCES += \ + dialog.cpp \ + dialog2.cpp \ + form.cpp \ + main.cpp \ + mainwindow.cpp + +HEADERS += \ + dialog.h \ + dialog2.h \ + form.h \ + mainwindow.h + +FORMS += \ + dialog.ui \ + dialog2.ui \ + form.ui \ + mainwindow.ui + +TRANSLATIONS += \ + IOT_zh_CN.ts +CONFIG += lrelease +CONFIG += embed_translations + +# Default rules for deployment. +qnx: target.path = /tmp/$${TARGET}/bin +else: unix:!android: target.path = /opt/$${TARGET}/bin +!isEmpty(target.path): INSTALLS += target + +DISTFILES += \ + .env diff --git a/IOT.pro.user b/IOT.pro.user new file mode 100644 index 0000000..de8e4d7 --- /dev/null +++ b/IOT.pro.user @@ -0,0 +1,271 @@ + + + + + + EnvironmentId + {5913d737-a7b3-40d5-81b3-ef43144c2778} + + + ProjectExplorer.Project.ActiveTarget + 0 + + + ProjectExplorer.Project.EditorSettings + + true + false + true + + Cpp + + CppGlobal + + + + QmlJS + + QmlJSGlobal + + + 2 + UTF-8 + false + 4 + false + 80 + true + true + 1 + 0 + false + true + false + 0 + true + true + 0 + 8 + true + false + 1 + true + true + true + *.md, *.MD, Makefile + false + true + true + + + + ProjectExplorer.Project.PluginSettings + + + true + false + true + true + true + true + + + 0 + true + + true + true + Builtin.DefaultTidyAndClazy + 8 + false + + + + true + + + true + + + + + ProjectExplorer.Project.Target.0 + + Desktop + Desktop Qt 6.8.0 MinGW 64-bit + Desktop Qt 6.8.0 MinGW 64-bit + qt.qt6.dev.win64_mingw_kit + 1 + 0 + 0 + + 0 + C:\Users\qw200\Documents\C or C++ for YANG\build-IOT-Desktop_Qt_6_6_0_MinGW_64_bit-Debug + C:/Users/qw200/Documents/C or C++ for YANG/build-IOT-Desktop_Qt_6_6_0_MinGW_64_bit-Debug + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Debug + Qt4ProjectManager.Qt4BuildConfiguration + 2 + + + E:\C++-QT\build-IOT-Desktop_Qt_6_6_0_MinGW_64_bit-Release + E:/C++-QT/build-IOT-Desktop_Qt_6_6_0_MinGW_64_bit-Release + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Release + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + + + 0 + C:\Users\qw200\Documents\C or C++ for YANG\build-IOT-Desktop_Qt_6_6_0_MinGW_64_bit-Profile + C:/Users/qw200/Documents/C or C++ for YANG/build-IOT-Desktop_Qt_6_6_0_MinGW_64_bit-Profile + + + true + QtProjectManager.QMakeBuildStep + false + + + + true + Qt4ProjectManager.MakeStep + + 2 + 构建 + 构建 + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + clean + + 1 + 清除 + 清除 + ProjectExplorer.BuildSteps.Clean + + 2 + false + + false + + Profile + Qt4ProjectManager.Qt4BuildConfiguration + 0 + 0 + 0 + + 3 + + + 0 + 部署 + 部署 + ProjectExplorer.BuildSteps.Deploy + + 1 + + false + ProjectExplorer.DefaultDeployConfiguration + + 1 + + true + true + 0 + true + + + 2 + + false + -e cpu-cycles --call-graph "dwarf,4096" -F 250 + IOT2 + Qt4ProjectManager.Qt4RunConfiguration:E:/C++-QT/IOT/IOT.pro + E:/C++-QT/IOT/IOT.pro + true + true + true + true + + 1 + + + + ProjectExplorer.Project.TargetCount + 1 + + + ProjectExplorer.Project.Updater.FileVersion + 22 + + + Version + 22 + + diff --git a/IOT_zh_CN.ts b/IOT_zh_CN.ts new file mode 100644 index 0000000..14bccd1 --- /dev/null +++ b/IOT_zh_CN.ts @@ -0,0 +1,3 @@ + + + diff --git a/README.md b/README.md new file mode 100644 index 0000000..c023956 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +## HI diff --git a/dialog.cpp b/dialog.cpp new file mode 100644 index 0000000..0ceb116 --- /dev/null +++ b/dialog.cpp @@ -0,0 +1,269 @@ +#include "dialog.h" +#include "ui_dialog.h" +#include +#include +QStringList parts; +QByteArray byteArray; +QString formattedVersion; +QString newves; +QString ID; +QString remainderx; +Dialog::Dialog(const QString& text, QWidget *parent) : + QDialog(parent), + ui(new Ui::Dialog), + client(new QMqttClient(this)) +{ + ui->setupUi(this); + setWindowTitle("设备管理"); + ID=text; + ui->label_6->setText("设备ID:"+text); + trimmedText = text.mid(2); // 从索引2(即"fp"之后)开始截取文本 + + client->setHostname("url"); + client->setPort(123); + client->setClientId("clientid"); + client->connectToHost(); + + QObject::connect(client, &QMqttClient::connected, [this]() { + qDebug() << "Connected to MQTT broker!"; + // 订阅主题 + QMqttTopicFilter filter("Flowerpot"); + client->subscribe(filter); + }); + + QObject::connect(client, &QMqttClient::messageReceived, [this](const QByteArray& message, const QMqttTopicName& topic) { + QString messageContent = message; + QString desiredPrefix = "#ID" + trimmedText; + formattedVersion =""; + if (messageContent.startsWith(desiredPrefix)) { + + ui->label_7->setText("设备状态:在线"); + QString messageString = QString::fromUtf8(message); + qDebug() << "Received message:" << message << "from topic:" << topic.name(); + parts = messageString.split('#'); + + for (const QString& part : parts) { + qDebug() << "Split part:" << part; + } + QString firmwareVersion = parts[8]; + int versionNumber = firmwareVersion.toInt(); // 将字符串转换为整数 + + int x = versionNumber / 100; // 获取百位数 + int y = (versionNumber / 10) % 10; // 获取十位数 + int z = versionNumber % 10; // 获取个位数 + + formattedVersion = QString("V%1.%2.%3").arg(x).arg(y).arg(z); // 创建格式化后的版本号字符串 + ui->label_8->setText("固件版本:"+formattedVersion); + ui->label_3->setText(parts[2]+"%"); + ui->label_4->setText(parts[4]+"%"); + ui->label_5->setText(parts[3]+"%"); + if(parts[6]=="1"){ + ui->pushButton->setStyleSheet("background-color: red;"); + }else{ + ui->pushButton->setStyleSheet("background-color: white;"); + } + if(parts[7]=="1"){ + ui->pushButton_2->setStyleSheet("background-color: red;"); + }else{ + ui->pushButton_2->setStyleSheet("background-color: white;"); + } + if(parts[5]=="1"){ + ui->pushButton_3->setStyleSheet("background-color: red;"); + }else{ + ui->pushButton_3->setStyleSheet("background-color: white;"); + } + ui->checkBox->blockSignals(true); + if (parts[9] == "1") { + ui->checkBox->setCheckState(Qt::Checked); // 设置为选中状态 + } else { + ui->checkBox->setCheckState(Qt::Unchecked); // 设置为未选中状态 + } + ui->checkBox->blockSignals(false); + } else { + // 忽略其他的消息 + } + }); + //更新检查服务器 + QNetworkAccessManager *manager = new QNetworkAccessManager(this); + QUrl url("updata url"); + QNetworkRequest request(url); + + // Set unsafe SSL configuration + QSslConfiguration config = request.sslConfiguration(); + config.setPeerVerifyMode(QSslSocket::VerifyNone); + request.setSslConfiguration(config); + + QNetworkReply *reply = manager->get(request); + + // Connect to the finished signal + connect(reply, &QNetworkReply::finished, [=]() { + if (reply->error() == QNetworkReply::NoError) { + // Read the JSON data + QByteArray data = reply->readAll(); + + // Display the JSON data in a message box + QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8()); + QJsonObject jsonObj = jsonDoc.object(); + + // 获取数据 + QJsonObject jObj2 = jsonDoc["data"].toObject(); + QString str = jObj2 ["content"].toString(); + qDebug() << str; + newves = str.left(6); // 提取前6个字符组成newves + + remainderx = str.mid(6); // 提取剩下的字符 + remainderx.replace("#", "\n"); + qDebug() << "update1111111"; + qDebug() << newves; + qDebug() << formattedVersion; + if (newves != formattedVersion) { + // QMessageBox::warning(this, "Error", "已发布新版本\"" + info + "\"。\n点击\"设置\"下载最新版本。"); + // ui->pushButton_4->setText("发现新版本"); + ui->pushButton_6->setStyleSheet("background-color: red;"); + ui->pushButton_6->setText("发现新版本!"); +qDebug() << "update"; + } + else { + // ui->pushButton_4->setText("暂无更新"); +qDebug() << "no"; + } + } + else { + // Display an error message + QMessageBox::warning(this, "Error", reply->errorString()); + } + + // Clean up + reply->deleteLater(); + manager->deleteLater(); + }); +} + +Dialog::~Dialog() +{ + delete ui; +} + + + +void Dialog::on_pushButton_clicked() +{ + if (client->state() == QMqttClient::Connected) { + QMqttTopicName topic("Flowerpot"); + if (parts[6]=="1") { + QString str = "#IDTO" + trimmedText+"&OFFHOT"; + byteArray = str.toUtf8(); + }else{ + QString str = "#IDTO" + trimmedText+"&ONHOT"; + byteArray = str.toUtf8(); + } + + + client->publish(topic, byteArray, 0, false); + // 发送消息后做其他处理 + } else { + QMessageBox::warning(this, "Error", "MQTT client is not connected!"); + } +} + + +void Dialog::on_pushButton_2_clicked() +{ + if (client->state() == QMqttClient::Connected) { + QMqttTopicName topic("Flowerpot"); + if (parts[7]=="1") { + QString str = "#IDTO" + trimmedText+"&OFFLED"; + byteArray = str.toUtf8(); + }else{ + QString str = "#IDTO" + trimmedText+"&ONLED"; + byteArray = str.toUtf8(); + } + + + client->publish(topic, byteArray, 0, false); + // 发送消息后做其他处理 + } else { + QMessageBox::warning(this, "Error", "MQTT client is not connected!"); + } +} + + +void Dialog::on_pushButton_3_clicked() +{ + if (client->state() == QMqttClient::Connected) { + QMqttTopicName topic("Flowerpot"); + if (parts[5]=="1") { + QString str = "#IDTO" + trimmedText+"&OFFPUMP"; + byteArray = str.toUtf8(); + }else{ + QString str = "#IDTO" + trimmedText+"&ONPUMP"; + byteArray = str.toUtf8(); + } + + + client->publish(topic, byteArray, 0, false); + // 发送消息后做其他处理 + } else { + QMessageBox::warning(this, "Error", "MQTT client is not connected!"); + } +} + + +void Dialog::on_pushButton_4_clicked() +{ + // 实例化第二个 Dialog2 对象 + Dialog2 dialog2; + + // 显示第二个 Dialog2 + dialog2.exec(); +} + +void Dialog::on_pushButton_5_clicked() +{ + +} + +void Dialog::on_pushButton_6_clicked() +{ + form* formDialog = new form(ID, formattedVersion,newves,remainderx,this); // 使用其他名称替换 'form' + formDialog->show(); +} + + +void Dialog::on_checkBox_stateChanged(int arg1) +{ + if (arg1 == Qt::Checked) { + qDebug() << "复选框被选中"; + // 根据选中状态执行特定操作 + if (client->state() == QMqttClient::Connected) { + QMqttTopicName topic("Flowerpot"); + QString str = "#IDTO" + trimmedText+"&ONAUTO"; + byteArray = str.toUtf8(); + client->publish(topic, byteArray, 0, false); + // 发送消息后做其他处理 + } else { + QMessageBox::warning(this, "Error", "MQTT client is not connected!"); + } + } else if (arg1 == Qt::Unchecked) { + qDebug() << "复选框未被选中"; + // 根据未选中状态执行特定操作 + if (client->state() == QMqttClient::Connected) { + QMqttTopicName topic("Flowerpot"); + QString str = "#IDTO" + trimmedText+"&OFFAUTO"; + byteArray = str.toUtf8(); + client->publish(topic, byteArray, 0, false); + // 发送消息后做其他处理 + } else { + QMessageBox::warning(this, "Error", "MQTT client is not connected!"); + } + } +} + +void Dialog::closeEvent(QCloseEvent *event) +{ + // 断开 MQTT 连接 + client->disconnectFromHost(); + + // 调用父类的关闭事件处理函数 + QDialog::closeEvent(event); +} diff --git a/dialog.h b/dialog.h new file mode 100644 index 0000000..e2b80d0 --- /dev/null +++ b/dialog.h @@ -0,0 +1,44 @@ +#ifndef DIALOG_H +#define DIALOG_H +#include +#include "form.h" // 添加对 form.h 的引用 +#include "ui_form.h" +#include +#include +#include "dialog2.h" +#include "ui_dialog2.h" +namespace Ui { +class Dialog; +} + +class Dialog : public QDialog +{ + Q_OBJECT + +public: + explicit Dialog(const QString& text, QWidget *parent = nullptr); + ~Dialog(); +protected: + void closeEvent(QCloseEvent *event) override; +private slots: + void on_pushButton_5_clicked(); + + void on_pushButton_clicked(); + + void on_pushButton_2_clicked(); + + void on_pushButton_3_clicked(); + + void on_pushButton_4_clicked(); + + void on_pushButton_6_clicked(); + + void on_checkBox_stateChanged(int arg1); + +private: + Ui::Dialog *ui; + QMqttClient* client; + QString trimmedText; +}; + +#endif // DIALOG_H diff --git a/dialog.ui b/dialog.ui new file mode 100644 index 0000000..2bf1a30 --- /dev/null +++ b/dialog.ui @@ -0,0 +1,242 @@ + + + Dialog + + + + 0 + 0 + 401 + 367 + + + + Dialog + + + + + + + 16777215 + 130 + + + + 智能植物培育设备 + + + + + + + + + + 设备ID: + + + + + + + 设备状态:离线 + + + + + + + 固件版本: + + + + + + + 你的植物似乎很开心 + + + + + + + + + + 16777215 + 50 + + + + + + + + + + + + + + + 环境温度 + + + + + + 0.00% + + + + + + + + + + 土壤湿度 + + + + + + 0.00% + + + + + + + + + + 环境湿度 + + + + + + 0.00% + + + + + + + + + + + + + 0 + 150 + + + + 控制台 + + + + + + AI自动控制 + + + + + + + + + + 0 + 50 + + + + 环境恒温 + + + + + + + + 0 + 50 + + + + 环境光照 + + + + + + + + 0 + 50 + + + + 浇水 + + + + + + + + + + + + 0 + 50 + + + + AI对话 + + + + + + + + 0 + 50 + + + + AI生长预测 + + + + + + + + 0 + 50 + + + + 检查固件更新 + + + + + + + + + + + + + diff --git a/dialog2.cpp b/dialog2.cpp new file mode 100644 index 0000000..21e9eb5 --- /dev/null +++ b/dialog2.cpp @@ -0,0 +1,75 @@ +#include "dialog2.h" +#include "qnetworkaccessmanager.h" +#include "qnetworkreply.h" +#include "ui_dialog2.h" + +Dialog2::Dialog2(QWidget *parent) + : QDialog(parent) + , ui(new Ui::Dialog2) +{ + ui->setupUi(this); + setWindowTitle("AI Chat"); +} + +Dialog2::~Dialog2() +{ + delete ui; +} +QString strall; +QString discuss; +QString ask; +QString answer; +void Dialog2::on_pushButton_clicked() +{ + ui->textBrowser->setPlainText("正在等待ChatGPT回答您的问题,请稍等......"); + ask=ui->textEdit->toPlainText(); + discuss=discuss+"Q:"+ask+"A:"; + QString test2;"ESP8266控制电路数据上传:"+ask; + qDebug() << "ESP8266控制电路数据上传:"+ui->textEdit->toPlainText();; + // if(ask.length()>880){ + // QMessageBox::warning(this, "Error", "长度超出限制,当前共"+QString::number(ask.length())+"字节\n请删除部分字符使其控制在880字节以内。"); + //} + + + int num=0; + + QNetworkAccessManager manager; + + // 创建POST请求 + QUrl url("aiurl"); // 更换为你要访问的API地址 + QNetworkRequest request(url); + QString accessToken = "token"; + QByteArray authHeader = "Bearer " + accessToken.toUtf8(); + + request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded"); + request.setRawHeader("Authorization", authHeader); + // 准备POST数据 + QByteArray postData; + postData.append("session_id=123&content=[{\"role\":\"system\",\"content\":\"You are Flowerpot AI, a large language model trained by YANG\\nCarefully heed the user's instructions.\\nRespond using Markdown.\\nCurrent Date: 2024/3/18 14:00:23\\n\"},{\"role\":\"user\",\"content\":\""+ask.toUtf8()+"\"}]&max_context_length=5¶ms={\"model\":\"gpt-3.5-turbo\",\"temperature\":1,\"max_tokens\":2048,\"presence_penalty\":0,\"frequency_penalty\":0,\"max_context_length\":5,\"voiceShortName\":\"zh-CN-XiaoxiaoNeural\",\"rate\":1,\"pitch\":1}"); // 根据API要求,构建合适的POST参数 + + // 发送POST请求 + QNetworkReply *reply = manager.post(request, postData); + + // 等待请求完成 + QEventLoop loop; + QObject::connect(reply, &QNetworkReply::finished, &loop, &QEventLoop::quit); + loop.exec(); + QString str1="You:\n"+ask+"\n\n"; + + // 获取返回值 + if(reply->error() == QNetworkReply::NoError) { + QString responsex = reply->readAll(); + QString response= responsex.remove(responsex.length() - 6, 6); + QString str2="Chat Robot:\n"+response+"\n\n"; + strall=strall+str1+str2; + ui->textBrowser->setPlainText(strall); + QString test1="AI数据应答:"+response; + qDebug() << test1; + } else { + qDebug() << "Error:" << reply->errorString(); + } + + // 清理 + reply->deleteLater(); +} + diff --git a/dialog2.h b/dialog2.h new file mode 100644 index 0000000..28e2974 --- /dev/null +++ b/dialog2.h @@ -0,0 +1,25 @@ +#ifndef DIALOG2_H +#define DIALOG2_H + +#include + +namespace Ui { +class Dialog2; +} + +class Dialog2 : public QDialog +{ + Q_OBJECT + +public: + explicit Dialog2(QWidget *parent = nullptr); + ~Dialog2(); + +private slots: + void on_pushButton_clicked(); + +private: + Ui::Dialog2 *ui; +}; + +#endif // DIALOG2_H diff --git a/dialog2.ui b/dialog2.ui new file mode 100644 index 0000000..b3e785a --- /dev/null +++ b/dialog2.ui @@ -0,0 +1,65 @@ + + + Dialog2 + + + + 0 + 0 + 400 + 347 + + + + Dialog + + + + + + <html><head/><body><p align="center"><span style=" font-size:16pt;">Flower Chat</span></p></body></html> + + + + + + + + 0 + 230 + + + + + + + + + + + 16777215 + 51 + + + + + + + + + 16777215 + 51 + + + + 发送 + + + + + + + + + + diff --git a/form.cpp b/form.cpp new file mode 100644 index 0000000..21945e6 --- /dev/null +++ b/form.cpp @@ -0,0 +1,98 @@ +#include "form.h" +#include "ui_form.h" +#include +#include +QString st; +QString upid; +form::form(const QString& id, const QString& ves, const QString& newves, const QString& log,QWidget *parent) : + QDialog(parent), + ui(new Ui::form), + client(new QMqttClient(this)) +{ + ui->setupUi(this); + setWindowTitle("更新检查"); + st=id; + upid = id.mid(2); + //设备更新 + if(id!=""){ + client->setHostname("mqtt"); + client->setPort(123); + client->setClientId("clientid"); + client->connectToHost(); + + QObject::connect(client, &QMqttClient::connected, [this]() { + qDebug() << "Connected to MQTT broker!"; + // 订阅主题 + QMqttTopicFilter filter("Flowerpot"); + client->subscribe(filter); + }); + + ui->label_6->setText("设备ID:"+id); + ui->label_8->setText("固件版本:"+ves); + ui->label_3->setText(ves); + ui->label_5->setText(newves); + ui->textBrowser->setText(log); + if(ves==""){ + ui->label_7->setText("设备状态:离线"); + }else{ + ui->label_7->setText("设备状态:在线"); +} + } + //程序更新 + else{ +ui->label_6->setText("万物互联IOT设备PC控制软件更新"); +if(newves!=""){ +ui->label_7->setText("服务器状态:在线"); +}else{ +ui->label_7->setText("服务器状态:离线"); +} + + ui->label_8->setText("服务器最新版本:"+newves); + ui->label->setText("当前版本:"+ves); + ui->label_3->setText(ves); + ui->label_5->setText(newves); + ui->textBrowser->setText(log); + } +} +form::~form() +{ + delete ui; +} +#include +#include +void form::on_pushButton_clicked() +{ + if(st!=""){ + QMqttTopicName topic("Flowerpot"); + + QString str = "#IDTO"+upid+"&Updata"; + QByteArray byteArray = str.toUtf8(); + + + + client->publish(topic, byteArray, 0, false); + }else{ + QMessageBox::information(this, "密码提示", "即将打开链接,密钥:2xzk"); + QUrl url("updataurl"); // 替换为您要打开的网页URL + if (QDesktopServices::openUrl(url)) { + + + } else { +// 处理无法打开链接的错误 + + } + } + +} + +void form::closeEvent(QCloseEvent *event) +{ + if(st!=""){ + // 断开 MQTT 连接 + client->disconnectFromHost(); + + // 调用父类的关闭事件处理函数 + QDialog::closeEvent(event); + qDebug() << "offfff"; + } +} diff --git a/form.h b/form.h new file mode 100644 index 0000000..aedfe69 --- /dev/null +++ b/form.h @@ -0,0 +1,29 @@ +#ifndef FORM_H +#define FORM_H + +#include +#include +#include + +namespace Ui { +class form; +} + +class form : public QDialog +{ + Q_OBJECT +protected: + void closeEvent(QCloseEvent *event) override; +public: + explicit form(const QString& id, const QString& ves, const QString& newves, const QString& log,QWidget *parent = nullptr); + ~form(); + +private slots: + void on_pushButton_clicked(); + +private: + Ui::form *ui; + QMqttClient* client; +}; + +#endif // FORM_H diff --git a/form.ui b/form.ui new file mode 100644 index 0000000..fc13975 --- /dev/null +++ b/form.ui @@ -0,0 +1,163 @@ + + + form + + + + 0 + 0 + 400 + 428 + + + + Dialog + + + + + + + 16777215 + 130 + + + + 更新 + + + + + + + + + + 设备ID: + + + + + + + 设备状态: + + + + + + + 固件版本: + + + + + + + 你的植物似乎很开心 + + + + + + + + + + 16777215 + 50 + + + + + + + + + + + + + + + 当前版本 + + + + + + V1.0.0 + + + + + + + + + + 最新版本 + + + + + + V1.0.0 + + + + + + + + + + + + 更新日志 + + + + + + + 0 + 0 + + + + + + + + + 175 + 0 + + + + <html><head/><body><p align="justify">注意事项:</p><p align="justify">1.更新过程中请勿断开设备电源。</p><p align="justify">2.更新过程中请勿退出程序。</p><p align="justify">3.更新完成后,设备会自动重启。</p><p align="justify">4.设备重启过程中请耐心等待。</p><p align="justify">5.再次检查更新提示</p><p align="justify">“已是最新版本”时表明更新成功<br/></p></body></html> + + + + + + + + + + + 0 + 35 + + + + 更新 + + + + + + + + diff --git a/lib/Qt6Mqtt.prl b/lib/Qt6Mqtt.prl new file mode 100644 index 0000000..7aafd7a --- /dev/null +++ b/lib/Qt6Mqtt.prl @@ -0,0 +1,3 @@ +QMAKE_PRL_TARGET = libQt6Mqtt.a +QMAKE_PRL_CONFIG = shared +QMAKE_PRL_VERSION = 6.8.0 diff --git a/lib/cmake/Qt6BuildInternals/StandaloneTests/QtMqttTestsConfig.cmake b/lib/cmake/Qt6BuildInternals/StandaloneTests/QtMqttTestsConfig.cmake new file mode 100644 index 0000000..7c57fd7 --- /dev/null +++ b/lib/cmake/Qt6BuildInternals/StandaloneTests/QtMqttTestsConfig.cmake @@ -0,0 +1,8 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +# TODO: Ideally this should look for each Qt module separately, with each module's specific version, +# bypassing the Qt6 Config file, aka find_package(Qt6SpecificFoo) repated x times. But it's not +# critical. +find_package(Qt6 6.8.0 + COMPONENTS Mqtt) diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttAdditionalTargetInfo.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttAdditionalTargetInfo.cmake new file mode 100644 index 0000000..1ba4ec4 --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttAdditionalTargetInfo.cmake @@ -0,0 +1,48 @@ +# Additional target information for Qt6Mqtt +if(NOT DEFINED QT_DEFAULT_IMPORT_CONFIGURATION) + set(QT_DEFAULT_IMPORT_CONFIGURATION RELEASE) +endif() +__qt_internal_promote_target_to_global_checked(Qt6::Mqtt) +get_target_property(_qt_imported_location Qt6::Mqtt IMPORTED_LOCATION_RELEASE) +get_target_property(_qt_imported_implib Qt6::Mqtt IMPORTED_IMPLIB_RELEASE) +get_target_property(_qt_imported_location_default Qt6::Mqtt IMPORTED_LOCATION_${QT_DEFAULT_IMPORT_CONFIGURATION}) +get_target_property(_qt_imported_implib_default Qt6::Mqtt IMPORTED_IMPLIB_${QT_DEFAULT_IMPORT_CONFIGURATION}) + +# Import target "Qt6::Mqtt" for configuration "RelWithDebInfo" +set_property(TARGET Qt6::Mqtt APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO) + +if(_qt_imported_location) + set_property(TARGET Qt6::Mqtt PROPERTY IMPORTED_LOCATION_RELWITHDEBINFO "${_qt_imported_location}") +endif() +if(_qt_imported_implib) + set_property(TARGET Qt6::Mqtt PROPERTY IMPORTED_IMPLIB_RELWITHDEBINFO "${_qt_imported_implib}") +endif() + +# Import target "Qt6::Mqtt" for configuration "MinSizeRel" +set_property(TARGET Qt6::Mqtt APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL) + +if(_qt_imported_location) + set_property(TARGET Qt6::Mqtt PROPERTY IMPORTED_LOCATION_MINSIZEREL "${_qt_imported_location}") +endif() +if(_qt_imported_implib) + set_property(TARGET Qt6::Mqtt PROPERTY IMPORTED_IMPLIB_MINSIZEREL "${_qt_imported_implib}") +endif() + +# Default configuration +if(_qt_imported_location_default) + set_property(TARGET Qt6::Mqtt PROPERTY IMPORTED_LOCATION "${_qt_imported_location_default}") +endif() +if(_qt_imported_implib_default) + set_property(TARGET Qt6::Mqtt PROPERTY IMPORTED_IMPLIB "${_qt_imported_implib_default}") +endif() +__qt_internal_promote_target_to_global_checked(Qt6::MqttPrivate) + +unset(_qt_imported_location) +unset(_qt_imported_location_default) +unset(_qt_imported_soname) +unset(_qt_imported_soname_default) +unset(_qt_imported_objects) +unset(_qt_imported_objects_default) +unset(_qt_imported_clr) +unset(_qt_imported_clr_default) +unset(_qt_imported_configs) diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake new file mode 100644 index 0000000..ec4b897 --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttConfig.cmake @@ -0,0 +1,177 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + + +####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() ####### +####### Any changes to this file will be overwritten by the next CMake run #### +####### The input file was QtModuleConfig.cmake.in ######## + +get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE) + +macro(set_and_check _var _file) + set(${_var} "${_file}") + if(NOT EXISTS "${_file}") + message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !") + endif() +endmacro() + +macro(check_required_components _NAME) + foreach(comp ${${_NAME}_FIND_COMPONENTS}) + if(NOT ${_NAME}_${comp}_FOUND) + if(${_NAME}_FIND_REQUIRED_${comp}) + set(${_NAME}_FOUND FALSE) + endif() + endif() + endforeach() +endmacro() + +#################################################################################### + +cmake_minimum_required(VERSION 3.16...3.21) + +include(CMakeFindDependencyMacro) + +get_filename_component(_import_prefix "${CMAKE_CURRENT_LIST_FILE}" PATH) +get_filename_component(_import_prefix "${_import_prefix}" REALPATH) + +# Extra cmake code begin + +# Extra cmake code end + +# Find required dependencies, if any. +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/Qt6MqttDependencies.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttDependencies.cmake") + _qt_internal_suggest_dependency_debugging(Mqtt + __qt_Mqtt_pkg ${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE) +endif() + +# If *ConfigDependencies.cmake exists, the variable value will be defined there. +# Don't override it in that case. +if(NOT DEFINED "Qt6Mqtt_FOUND") + set("Qt6Mqtt_FOUND" TRUE) +endif() + +if (NOT QT_NO_CREATE_TARGETS AND Qt6Mqtt_FOUND) + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttTargets.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttAdditionalTargetInfo.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttExtraProperties.cmake" + OPTIONAL) + + # DEPRECATED + # Provide old style variables for includes, compile definitions, etc. + # These variables are deprecated and only provided on a best-effort basis to facilitate porting. + # Consider using target_link_libraries(app PRIVATE Qt6Mqtt) instead. + set(Qt6Mqtt_LIBRARIES "Qt6::Mqtt") + + get_target_property(_Qt6Mqtt_OWN_INCLUDE_DIRS + Qt6::Mqtt INTERFACE_INCLUDE_DIRECTORIES) + if(NOT _Qt6Mqtt_OWN_INCLUDE_DIRS) + set(_Qt6Mqtt_OWN_INCLUDE_DIRS "") + endif() + + if(TARGET Qt6::MqttPrivate) + get_target_property(_Qt6Mqtt_OWN_PRIVATE_INCLUDE_DIRS + Qt6::MqttPrivate INTERFACE_INCLUDE_DIRECTORIES) + if(NOT _Qt6Mqtt_OWN_PRIVATE_INCLUDE_DIRS) + set(_Qt6Mqtt_OWN_PRIVATE_INCLUDE_DIRS "") + endif() + endif() + + get_target_property(Qt6Mqtt_DEFINITIONS + Qt6::Mqtt INTERFACE_COMPILE_DEFINITIONS) + if(NOT Qt6Mqtt_DEFINITIONS) + set(Qt6Mqtt_DEFINITIONS "") + else() + list(TRANSFORM Qt6Mqtt_DEFINITIONS PREPEND "-D") + endif() + + get_target_property(Qt6Mqtt_COMPILE_DEFINITIONS + Qt6::Mqtt INTERFACE_COMPILE_DEFINITIONS) + if(NOT Qt6Mqtt_COMPILE_DEFINITIONS) + set(Qt6Mqtt_COMPILE_DEFINITIONS "") + endif() + + set(Qt6Mqtt_INCLUDE_DIRS + ${_Qt6Mqtt_OWN_INCLUDE_DIRS}) + + set(Qt6Mqtt_PRIVATE_INCLUDE_DIRS + ${_Qt6Mqtt_OWN_PRIVATE_INCLUDE_DIRS}) + + foreach(_module_dep ${_Qt6Mqtt_MODULE_DEPENDENCIES}) + if(_module_dep MATCHES ".+Private$") + set(_private_suffix "Private") + else() + set(_private_suffix "") + endif() + list(APPEND Qt6Mqtt${_private_suffix}_INCLUDE_DIRS + ${Qt6${_module_dep}_INCLUDE_DIRS}) + list(APPEND Qt6Mqtt${_private_suffix}_PRIVATE_INCLUDE_DIRS + ${Qt6${_module_dep}_PRIVATE_INCLUDE_DIRS}) + if(_private_suffix) + list(APPEND Qt6Mqtt_PRIVATE_INCLUDE_DIRS + ${Qt6${_module_dep}_PRIVATE_INCLUDE_DIRS}) + endif() + list(APPEND Qt6Mqtt${_private_suffix}_DEFINITIONS + ${Qt6${_module_dep}_DEFINITIONS}) + list(APPEND Qt6Mqtt${_private_suffix}_COMPILE_DEFINITIONS + ${Qt6${_module_dep}_COMPILE_DEFINITIONS}) + endforeach() + unset(_private_suffix) + + list(REMOVE_DUPLICATES Qt6Mqtt_INCLUDE_DIRS) + list(REMOVE_DUPLICATES Qt6Mqtt_PRIVATE_INCLUDE_DIRS) + list(REMOVE_DUPLICATES Qt6Mqtt_DEFINITIONS) + list(REMOVE_DUPLICATES Qt6Mqtt_COMPILE_DEFINITIONS) +endif() + +if (TARGET Qt6::Mqtt) + qt_make_features_available(Qt6::Mqtt) + + foreach(extra_cmake_include ) + include("${CMAKE_CURRENT_LIST_DIR}/${extra_cmake_include}") + endforeach() + + if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/Qt6MqttPlugins.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttPlugins.cmake") + endif() + + list(APPEND QT_ALL_MODULES_FOUND_VIA_FIND_PACKAGE "Mqtt") + + get_target_property(_qt_module_target_type "Qt6::Mqtt" TYPE) + if(NOT _qt_module_target_type STREQUAL "INTERFACE_LIBRARY") + get_target_property(_qt_module_plugin_types + Qt6::Mqtt MODULE_PLUGIN_TYPES) + if(_qt_module_plugin_types) + list(APPEND QT_ALL_PLUGIN_TYPES_FOUND_VIA_FIND_PACKAGE "${_qt_module_plugin_types}") + endif() + endif() + + + # Load Module's BuildInternals should any exist + if (Qt6BuildInternals_DIR AND + EXISTS "${CMAKE_CURRENT_LIST_DIR}/Qt6MqttBuildInternals.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttBuildInternals.cmake") + endif() + + if(NOT QT_NO_CREATE_VERSIONLESS_TARGETS) + if(CMAKE_VERSION VERSION_LESS 3.18 OR QT_USE_OLD_VERSION_LESS_TARGETS) + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttVersionlessTargets.cmake") + else() + include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttVersionlessAliasTargets.cmake") + endif() + endif() +else() + + set(Qt6Mqtt_FOUND FALSE) + if(NOT DEFINED Qt6Mqtt_NOT_FOUND_MESSAGE) + set(Qt6Mqtt_NOT_FOUND_MESSAGE + "Target \"Qt6::Mqtt\" was not found.") + + if(QT_NO_CREATE_TARGETS) + string(APPEND Qt6Mqtt_NOT_FOUND_MESSAGE + "Possibly due to QT_NO_CREATE_TARGETS being set to TRUE and thus " + "${CMAKE_CURRENT_LIST_DIR}/Qt6MqttTargets.cmake was not " + "included to define the target.") + endif() + endif() +endif() diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersion.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersion.cmake new file mode 100644 index 0000000..32ed4cf --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersion.cmake @@ -0,0 +1,68 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +# Include the basic version config file to get results of regular version checking. +include("${CMAKE_CURRENT_LIST_DIR}/Qt6MqttConfigVersionImpl.cmake") + +set(__qt_disable_package_version_check FALSE) + +# Allow to opt out of the version check. +if(QT_NO_PACKAGE_VERSION_CHECK) + set(__qt_disable_package_version_check TRUE) +endif() + +# Extra CMake code begin + +# Extra CMake code end + +if((NOT PACKAGE_VERSION_COMPATIBLE) OR PACKAGE_VERSION_UNSUITABLE) + set(__qt_package_version_incompatible TRUE) +else() + set(__qt_package_version_incompatible FALSE) +endif() + +if(__qt_disable_package_version_check) + # Don't show the warning needlessly if we know that we're doing an exact search, and the + # version found is not the exactly same. + if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION_EXACT + AND NOT PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(QT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING TRUE) + endif() + + # Warn if version check is disabled regardless if it's a Qt repo build or user project build. + # Allow to opt out of warning. + if(__qt_package_version_incompatible AND NOT QT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING + AND NOT ${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY) + message(WARNING + "Package ${PACKAGE_FIND_NAME} with version ${PACKAGE_VERSION} was accepted as " + "compatible because QT_NO_PACKAGE_VERSION_CHECK was set to TRUE. There is no guarantee " + "the build will succeed. You can silence this warning by passing " + "-DQT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING=TRUE") + endif() + + # Mark version as compatible. This is how we disable the version check. + set(PACKAGE_VERSION_COMPATIBLE TRUE) + unset(PACKAGE_VERSION_UNSUITABLE) + +# If QT_REPO_MODULE_VERSION is set, that means we are building a Qt repo. Show message that one can +# disable the check if they need to. +elseif(QT_REPO_MODULE_VERSION AND __qt_package_version_incompatible) + if(PACKAGE_FIND_VERSION_RANGE) + set(__qt_package_version_message_prefix "Version range ${PACKAGE_FIND_VERSION_RANGE}") + else() + set(__qt_package_version_message_prefix "Version ${PACKAGE_FIND_VERSION}") + endif() + + message(WARNING + "${__qt_package_version_message_prefix} of package ${PACKAGE_FIND_NAME} was requested but " + "an incompatible version was found: ${PACKAGE_VERSION}. You can pass " + "-DQT_NO_PACKAGE_VERSION_CHECK=TRUE to disable the version check and force the " + "incompatible version to be used. There is no guarantee the build will succeed. " + "Use at your own risk. " + "You can silence this warning by passing -DQT_NO_PACKAGE_VERSION_INCOMPATIBLE_WARNING=TRUE") +endif() + +unset(__qt_disable_package_version_check) +unset(__qt_disable_package_version_check_due_to_developer_build) +unset(__qt_package_version_message_prefix) +unset(__qt_package_version_incompatible) diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersionImpl.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersionImpl.cmake new file mode 100644 index 0000000..3baab70 --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttConfigVersionImpl.cmake @@ -0,0 +1,43 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is >= requested version. +# The variable CVF_VERSION must be set before calling configure_file(). + +set(PACKAGE_VERSION "6.8.0") + +if (PACKAGE_FIND_VERSION_RANGE) + # Package version must be in the requested version range + if ((PACKAGE_FIND_VERSION_RANGE_MIN STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION_MIN) + OR ((PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "INCLUDE" AND PACKAGE_VERSION VERSION_GREATER PACKAGE_FIND_VERSION_MAX) + OR (PACKAGE_FIND_VERSION_RANGE_MAX STREQUAL "EXCLUDE" AND PACKAGE_VERSION VERSION_GREATER_EQUAL PACKAGE_FIND_VERSION_MAX))) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + endif() +else() + if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION) + set(PACKAGE_VERSION_COMPATIBLE FALSE) + else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if(PACKAGE_FIND_VERSION STREQUAL PACKAGE_VERSION) + set(PACKAGE_VERSION_EXACT TRUE) + endif() + endif() +endif() + + +# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if(CMAKE_SIZEOF_VOID_P STREQUAL "" OR "8" STREQUAL "") + return() +endif() + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT CMAKE_SIZEOF_VOID_P STREQUAL "8") + math(EXPR installedBits "8 * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttDependencies.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttDependencies.cmake new file mode 100644 index 0000000..f15e8f2 --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttDependencies.cmake @@ -0,0 +1,46 @@ +# Copyright (C) 2024 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause + +# Make sure Qt6 is found before anything else. +set(Qt6Mqtt_FOUND FALSE) + +if("${_qt_cmake_dir}" STREQUAL "") + set(_qt_cmake_dir "${QT_TOOLCHAIN_RELOCATABLE_CMAKE_DIR}") +endif() +set(__qt_use_no_default_path_for_qt_packages "NO_DEFAULT_PATH") +if(QT_DISABLE_NO_DEFAULT_PATH_IN_QT_PACKAGES) + set(__qt_use_no_default_path_for_qt_packages "") +endif() + +# Don't propagate REQUIRED so we don't immediately FATAL_ERROR, rather let the find_dependency calls +# set _NOT_FOUND_MESSAGE which will be displayed by the includer of the Dependencies file. +set(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED FALSE) + +if(NOT Qt6_FOUND) + find_dependency(Qt6 6.8.0 + PATHS + ${QT_BUILD_CMAKE_PREFIX_PATH} + "${CMAKE_CURRENT_LIST_DIR}/.." + "${_qt_cmake_dir}" + ${_qt_additional_packages_prefix_paths} + ${__qt_use_no_default_path_for_qt_packages} + ) +endif() + + +# note: _third_party_deps example: "ICU\\;FALSE\\;1.0\\;i18n uc data;ZLIB\\;FALSE\\;\\;" +set(__qt_Mqtt_third_party_deps "") +_qt_internal_find_third_party_dependencies("Mqtt" __qt_Mqtt_third_party_deps) + +# Find Qt tool package. +set(__qt_Mqtt_tool_deps "") +_qt_internal_find_tool_dependencies("Mqtt" __qt_Mqtt_tool_deps) + +# note: target_deps example: "Qt6Core\;5.12.0;Qt6Gui\;5.12.0" +set(__qt_Mqtt_target_deps "Qt6Core\;6.8.0;Qt6Network\;6.8.0") +set(__qt_Mqtt_find_dependency_paths "${CMAKE_CURRENT_LIST_DIR}/.." "${_qt_cmake_dir}") +_qt_internal_find_qt_dependencies("Mqtt" __qt_Mqtt_target_deps + __qt_Mqtt_find_dependency_paths) + +set(_Qt6Mqtt_MODULE_DEPENDENCIES "Core;Network") +set(Qt6Mqtt_FOUND TRUE) diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttTargets.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttTargets.cmake new file mode 100644 index 0000000..967467f --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttTargets.cmake @@ -0,0 +1,100 @@ +# Generated by CMake + +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8) + message(FATAL_ERROR "CMake >= 2.8.0 required") +endif() +if(CMAKE_VERSION VERSION_LESS "2.8.3") + message(FATAL_ERROR "CMake >= 2.8.3 required") +endif() +cmake_policy(PUSH) +cmake_policy(VERSION 2.8.3...3.24) +#---------------------------------------------------------------- +# Generated CMake target import file. +#---------------------------------------------------------------- + +# Commands may need to know the format version. +set(CMAKE_IMPORT_FILE_VERSION 1) + +if(CMAKE_VERSION VERSION_LESS 3.0.0) + message(FATAL_ERROR "This file relies on consumers using CMake 3.0.0 or greater.") +endif() + +# Protect against multiple inclusion, which would fail when already imported targets are added once more. +set(_cmake_targets_defined "") +set(_cmake_targets_not_defined "") +set(_cmake_expected_targets "") +foreach(_cmake_expected_target IN ITEMS Qt6::Mqtt Qt6::MqttPrivate) + list(APPEND _cmake_expected_targets "${_cmake_expected_target}") + if(TARGET "${_cmake_expected_target}") + list(APPEND _cmake_targets_defined "${_cmake_expected_target}") + else() + list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}") + endif() +endforeach() +unset(_cmake_expected_target) +if(_cmake_targets_defined STREQUAL _cmake_expected_targets) + unset(_cmake_targets_defined) + unset(_cmake_targets_not_defined) + unset(_cmake_expected_targets) + unset(CMAKE_IMPORT_FILE_VERSION) + cmake_policy(POP) + return() +endif() +if(NOT _cmake_targets_defined STREQUAL "") + string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}") + string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}") + message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n") +endif() +unset(_cmake_targets_defined) +unset(_cmake_targets_not_defined) +unset(_cmake_expected_targets) + + +# Create imported target Qt6::Mqtt +add_library(Qt6::Mqtt SHARED IMPORTED) + +set_target_properties(Qt6::Mqtt PROPERTIES + COMPATIBLE_INTERFACE_STRING "QT_MAJOR_VERSION" + INTERFACE_COMPILE_DEFINITIONS "QT_MQTT_LIB" + INTERFACE_INCLUDE_DIRECTORIES "C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/include;C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/include/QtMqtt" + INTERFACE_LINK_LIBRARIES "Qt6::Core;Qt6::Network" + INTERFACE_QT_MAJOR_VERSION "6" + INTERFACE_SOURCES "\$<\$>:C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/src/mqtt/meta_types/qt6mqtt_release_metatypes.json>" + _qt_config_module_name "mqtt" + _qt_is_public_module "TRUE" + _qt_module_has_headers "ON" + _qt_module_has_private_headers "TRUE" + _qt_module_has_public_headers "TRUE" + _qt_module_include_name "QtMqtt" + _qt_module_interface_name "Mqtt" + _qt_package_name "Qt6Mqtt" + _qt_package_version "6.8.0" + _qt_private_module_target_name "MqttPrivate" +) + +# Create imported target Qt6::MqttPrivate +add_library(Qt6::MqttPrivate INTERFACE IMPORTED) + +set_target_properties(Qt6::MqttPrivate PROPERTIES + INTERFACE_INCLUDE_DIRECTORIES "C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/src/mqtt;\$<\$>:C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/include/QtMqtt/6.8.0>;\$<\$>:C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/include/QtMqtt/6.8.0/QtMqtt>;\$<\$>:>;\$<\$>:>" + INTERFACE_LINK_LIBRARIES "Qt6::CorePrivate;Qt6::Mqtt" + _qt_config_module_name "mqtt_private" + _qt_is_private_module "TRUE" + _qt_package_name "Qt6Mqtt" + _qt_package_version "6.8.0" + _qt_public_module_target_name "Mqtt" +) + +# Import target "Qt6::Mqtt" for configuration "Release" +set_property(TARGET Qt6::Mqtt APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) +set_target_properties(Qt6::Mqtt PROPERTIES + IMPORTED_IMPLIB_RELEASE "C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/lib/libQt6Mqtt.a" + IMPORTED_LOCATION_RELEASE "C:/Users/qw200/Downloads/qtmqtt-dev/build/Desktop_Qt_6_8_0_MinGW_64_bit-Release/bin/Qt6Mqtt.dll" + ) + +# This file does not depend on other imported targets which have +# been exported from the same project but in a separate export set. + +# Commands beyond this point should not need to know the version. +set(CMAKE_IMPORT_FILE_VERSION) +cmake_policy(POP) diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessAliasTargets.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessAliasTargets.cmake new file mode 100644 index 0000000..24c74bf --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessAliasTargets.cmake @@ -0,0 +1,7 @@ +# Protect against multiple inclusion, which would fail when already imported targets are +# added once more. +_qt_internal_check_multiple_inclusion(_targets_not_defined "Mqtt;MqttPrivate") + +_qt_internal_create_versionless_alias_targets("${_targets_not_defined}" Qt6) + +unset(_targets_not_defined) diff --git a/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessTargets.cmake b/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessTargets.cmake new file mode 100644 index 0000000..824ed56 --- /dev/null +++ b/lib/cmake/Qt6Mqtt/Qt6MqttVersionlessTargets.cmake @@ -0,0 +1,7 @@ +# Protect against multiple inclusion, which would fail when already imported targets are +# added once more. +_qt_internal_check_multiple_inclusion(_targets_not_defined "Mqtt;MqttPrivate") + +_qt_internal_create_versionless_targets("${_targets_not_defined}" Qt6) + +unset(_targets_not_defined) diff --git a/lib/libQt6Mqtt.a b/lib/libQt6Mqtt.a new file mode 100644 index 0000000000000000000000000000000000000000..0f5f4c19e409842ada160faf3315dc6937b2447b GIT binary patch literal 254740 zcmeIb4V)!Mb=X_eD-2OE#x_=DTi`_qSqPB2`+my;v>&r*rPXS7XA$yR(dy33-JL7$ z&YivY&Z1THFyUcLh(cscc$g4uV?uZsJ3Jo74k5O}!yh38JC47Dd3p}^)8qMr$8#J^ z{E>6Ix<0z=RCU!z{?VFy`}eDRXZoJ1?&|*csZ-}vRX_jc{$zdg<(J>Mzqloxq?M*= zGimSNA7?-5pZoVW(ryoag6+P`8H*la>^+cv_*WVG(c?V**ryr8^!|f9ec-)}Vfx@# zdHRWm7{l~0|BR=PtTBe^qo3jFr(?!2{VOOJ)4zV4r=Nv=m>%8W>60H~4AZ9`DN#5^jlXlhUs^Hg{R+r6JwYjyP2oo`!Zvge*axO zJ${feOkezCp8n|djA8oHEj)esD~w_KukYjOD^12Qef9G^{Uw|mq$T!Do}$mNB}`A7 z@$`%?Tf%htS9$vS53?mq&)(qao1e{=Fn!C%dAbtzWBT^XczW*p*b=7wck}du%h?j9 z7eX1Bt~<`t^84*{OPF3Z;^~&JV@sG0zKf^j z>)8^fSN;r7w_VGYFdcgvPsjg?Enzyb#?z^YEn&LrJv@Ck$YT1Q_wsb_^Vkxm`yS?L z?JH~v)8H|lHebh*A3r}6vQ5~j&Bc$!Vv5~hp4!PBKSTf+4BKE%`O;JRUY z{T5GefI4FOzL=-)e=A$U^bfwk)5Bf1gz2rH;OPhUvn5PF2-gwQKY5&|cizU9FueDvnW=oiU6pn%EeQCf}@@ndWW(~KE~5uznd*Via^I?>1kK62-DNw#?$4`ViBfi zzJ;f6cs7eLedE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czVwX@Mz79(hb zwNOwA=3CXgzIIED30E!e2KbGueA@chSl757%h*`)$Y#fR98?yL@5POO+1IoBn^-sd z8wlE9IU2D}`~cUhs#+YruDVgo#ZeaI!~8;LpAmZxe48zEVC`+Rh89E7+zg4(s5z~Q z<_A1z*6DN6Y@yGf8J{5Bs%ZY3cuUi>%=?+_Y`I^NECGL&5G=ih7V1)0!tc(mwC?Hr zNWKTZBK9fxGzfnZu80NtC!=KQIgqOhqhhbr>WQh<@Ah~O^vI&?Ij}?)jpqRSaJW@H z2bL8!WTdhSWrRj5zkU~Y9nZC{oOkf#U{jiWoA1azBlZUP4(Hr9?XePLc7~#~mk7hd zgVM!{u8cjCxM$$Mc~w5uM|YssmdxF(518Ou)>JKRYSkuAP}oSsoLL`TxuB4-zfDuP zl25hR+Z0l@bWli&QxrDBqDkibig{aQ{c@T@T-FB%qwj4BsaiTHB*iHT+aa-}g)U_5 zZ_yO;H_IQzH^s@2=H6?OsaiTHB*iHTyJ68F!K~`V&s#L;83ctB{LFUipw)&S@+KH%-{+JxK(*( zPSSGHGjlVP5$c)wIu~!S4(U^IZPM?`uBNW@9?19LSH#`|pN^-@RqIMPotY_OSbK3Zf{wB#oF0eD@jqT^+eReORo`;?|EZwpUGMbj#iw_1yfv?HvzTUvi1TzIoMP$ z<5s>S`-~XA9mHsHi?y?$RuUpeYo$SP4%yx+t#%98RaG|Mm74A4viYvojq>@#9_!?(L;0y08V@vv-Xe!2zgY)n)@@B abjA+md+;k_r{Gg#%&3_`m?>fCu>S!|=Ot$V literal 0 HcmV?d00001 diff --git a/lib/pkgconfig/Qt6Mqtt.pc b/lib/pkgconfig/Qt6Mqtt.pc new file mode 100644 index 0000000..849eecc --- /dev/null +++ b/lib/pkgconfig/Qt6Mqtt.pc @@ -0,0 +1,12 @@ +prefix=/QT/6.8.0/mingw_64 +exec_prefix=${prefix} +bindir=${prefix}/bin +libexecdir=${prefix}/./bin +libdir=${prefix}/lib +includedir=${prefix}/include + +Name: Qt6 Mqtt +Description: Qt Mqtt module +Version: 6.8.0 +Libs: -L${libdir} -lQt6Mqtt +Cflags: -I${includedir}/QtMqtt -I${includedir} -DQT_MQTT_LIB diff --git a/lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_Release_step2.pc b/lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_Release_step2.pc new file mode 100644 index 0000000..8d6f3a2 --- /dev/null +++ b/lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_Release_step2.pc @@ -0,0 +1,14 @@ +prefix=/QT/6.8.0/mingw_64 +exec_prefix=${prefix} +bindir=${prefix}/bin +libexecdir=${prefix}/./bin +libdir=${prefix}/lib +includedir=${prefix}/include + + +Name: Qt6 Mqtt +Description: Qt Mqtt module +Version: 6.8.0 +Libs: -L${libdir} -lQt6Mqtt +Cflags: -I${includedir}/QtMqtt -I${includedir} -DQT_MQTT_LIB +Requires: diff --git a/lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_step1.pc b/lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_step1.pc new file mode 100644 index 0000000..6d0e88a --- /dev/null +++ b/lib/pkgconfig/preliminary_pc_for_Qt6Mqtt_step1.pc @@ -0,0 +1,14 @@ +prefix=/QT/6.8.0/mingw_64 +exec_prefix=${prefix} +bindir=${prefix}/bin +libexecdir=${prefix}/./bin +libdir=${prefix}/lib +includedir=${prefix}/include +$<$:mkspecsdir=${prefix}/mkspecs> +$<1: > +Name: Qt6 Mqtt +Description: Qt Mqtt module +Version: 6.8.0 +Libs: $<$,INTERFACE_LIBRARY>>:-L${libdir} -lQt6Mqtt> $<$:$, >> $, > +Cflags: $<$:-I$, -I>> $<$:-D$, -D>> +Requires: $, > diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..20827b3 --- /dev/null +++ b/main.cpp @@ -0,0 +1,25 @@ + +#include "mainwindow.h" + +#include + +#include +#include + +int main(int argc, char *argv[]) +{ + QApplication a(argc, argv); + + QTranslator translator; + const QStringList uiLanguages = QLocale::system().uiLanguages(); + for (const QString &locale : uiLanguages) { + const QString baseName = "IOT_" + QLocale(locale).name(); + if (translator.load(":/i18n/" + baseName)) { + a.installTranslator(&translator); + break; + } + } + MainWindow w; + w.show(); + return a.exec(); +} diff --git a/mainwindow.cpp b/mainwindow.cpp new file mode 100644 index 0000000..254fcc0 --- /dev/null +++ b/mainwindow.cpp @@ -0,0 +1,312 @@ +#include +#include "mainwindow.h" +#include "qjsondocument.h" +#include "qjsonobject.h" +#include "qnetworkaccessmanager.h" +#include "qnetworkreply.h" +#include "ui_mainwindow.h" +#include +#include +#include +#include +#include +#include +#include + +#include +QString newves33; +QString ves33="V1.0.0"; +QString remainderx33; +MainWindow::MainWindow(QWidget *parent) + : QMainWindow(parent) + , ui(new Ui::MainWindow) +{ + ui->setupUi(this); +setWindowTitle("万物互联IOT桌面端"); + // 恢复上次保存的按钮信息 + restoreButtonSettings(); + //更新检查连接 + QNetworkAccessManager *manager = new QNetworkAccessManager(this); + QUrl url("api1url"); + QNetworkRequest request(url); + + // Set unsafe SSL configuration + QSslConfiguration config = request.sslConfiguration(); + config.setPeerVerifyMode(QSslSocket::VerifyNone); + request.setSslConfiguration(config); + + QNetworkReply *reply = manager->get(request); + + // Connect to the finished signal + connect(reply, &QNetworkReply::finished, [=]() { + if (reply->error() == QNetworkReply::NoError) { + // Read the JSON data + QByteArray data = reply->readAll(); + + // Display the JSON data in a message box + QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8()); + QJsonObject jsonObj = jsonDoc.object(); + + // 获取数据 + QJsonObject jObj2 = jsonDoc["data"].toObject(); + QString str = jObj2 ["content"].toString(); + qDebug() << str; + newves33 = str.left(6); // 提取前6个字符组成newves + + remainderx33 = str.mid(6); // 提取剩下的字符 + remainderx33.replace("#", "\n"); + qDebug() << "update1111111"; + qDebug() << newves33; + qDebug() << ves33; + if (newves33 != ves33) { + // QMessageBox::warning(this, "Error", "已发布新版本\"" + info + "\"。\n点击\"设置\"下载最新版本。"); + ui->pushButton->setText("发现新版本"); + qDebug() << "update"; + } + else { + // ui->pushButton_4->setText("暂无更新"); + qDebug() << "no"; + } + } + else { + // Display an error message + QMessageBox::warning(this, "Error", reply->errorString()); + } + + // Clean up + reply->deleteLater(); + manager->deleteLater(); + }); + everyday(); + everyEinglish(); +} + +MainWindow::~MainWindow() +{ + delete ui; +} + +void MainWindow::on_pushButton_clicked() +{ + form* formDialog = new form("",ves33,newves33,remainderx33,this); // 使用其他名称替换 'form' + formDialog->show(); + +} + +void MainWindow::onNewButtonClicked() +{ + // 在新按钮被点击时执行的操作 + qDebug() << "New Button Clicked"; +} + +void MainWindow::on_pushButton_2_clicked() +{ + // 创建一个新的 addButton + + + // 创建输入对话框 + bool ok; + QString buttonText = QInputDialog::getText(this, "添加设备", "请输入设备ID:", QLineEdit::Normal, "", &ok); + + // 如果用户点击了“OK”按钮,则设置按钮的文本名称为输入的内容 + if (ok && !buttonText.isEmpty()) { + + if (buttonText.contains("fp")) { + QPushButton* newButton = new QPushButton("Add Button", ui->groupBox); + + // 获取已存在的布局对象 + QVBoxLayout* layout = ui->verticalLayout; + + // 添加新的 addButton 到布局 + layout->addWidget(newButton); + newButton->setText("Flowerpot\nID:"+buttonText); + // 连接新按钮的 clicked 信号到 lambda 函数 + connect(newButton, &QPushButton::clicked, [=]() { + // 获取当前按钮的索引 + int buttonIndex = layout->indexOf(newButton) + 1; + // 显示当前按钮的索引 + + // 如果 addButton 文本名称包含 "fp",则弹出相应的窗口 + if (buttonText.contains("fp")) { + QString fpText = buttonText.mid(buttonText.indexOf("fp")); + Dialog* dialog = new Dialog(fpText, this); + dialog->show(); + } + + // 可以在这里添加其他点击按钮时的操作 + }); + }else{ + QMessageBox::information(this, "设备ID错误", "设备ID错误,检查你输入的设备ID是否正确!" ); + + } + + } + + +} + +void MainWindow::saveButtonSettings() +{ + // 获取已存在的布局对象 + QVBoxLayout* layout = ui->verticalLayout; + + // 创建 QSettings 对象,用于读写注册表信息 + QSettings settings("IOT", "IOT"); + + // 清空注册表中的旧按钮信息 + settings.remove("Buttons"); + + // 保存每个按钮的文本和索引 + for (int i = 0; i < layout->count(); i++) { + QPushButton* button = qobject_cast(layout->itemAt(i)->widget()); + if (button) { + QString buttonText = button->text(); + settings.setValue(QString("Buttons/button%1Text").arg(i), buttonText); + } + } +} + +void MainWindow::restoreButtonSettings() +{ + // 获取已存在的布局对象 + QVBoxLayout* layout = ui->verticalLayout; + + // 创建 QSettings 对象,用于读写注册表信息 + QSettings settings("IOT", "IOT"); + + // 遍历按钮索引,读取注册表中的按钮信息,并添加按钮到布局 + int buttonIndex = 0; + while (true) { + QString buttonText = settings.value(QString("Buttons/button%1Text").arg(buttonIndex)).toString(); + if (buttonText.isEmpty()) { + break; // 没有更多的按钮信息可读取,退出循环 + } + + QPushButton* newButton = new QPushButton(buttonText, ui->groupBox); + layout->addWidget(newButton); + + // 连接按钮的 clicked 信号到槽函数 + connect(newButton, &QPushButton::clicked, [=]() { + // 显示按钮索引 + // QMessageBox::information(this, "Button Index", "This is button number " + QString::number(buttonIndex)); + if (buttonText.contains("fp")) { + QString fpText = buttonText.mid(buttonText.indexOf("fp")); + Dialog* dialog = new Dialog(fpText, this); + dialog->show(); + } + // 可以在这里添加按钮点击时的操作 + }); + + buttonIndex++; + } +} + +void MainWindow::closeEvent(QCloseEvent* event) +{ + saveButtonSettings(); + event->accept(); +} +void MainWindow::everyday() +{ + QNetworkAccessManager *manager = new QNetworkAccessManager(this); + QUrl url("updataurl"); + QNetworkRequest request(url); + + // Set unsafe SSL configuration + QSslConfiguration config = request.sslConfiguration(); + config.setPeerVerifyMode(QSslSocket::VerifyNone); + request.setSslConfiguration(config); + + QNetworkReply *reply = manager->get(request); + + // Connect to the finished signal + connect(reply, &QNetworkReply::finished, [=]() { + if (reply->error() == QNetworkReply::NoError) { + // Read the JSON data + QByteArray data = reply->readAll(); + + // Display the JSON data in a message box + QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8()); + QJsonObject jsonObj = jsonDoc.object(); + + // 获取数据 + QString city = jsonObj["city"].toString(); + QJsonObject jObj2 = jsonDoc["info"].toObject(); + QString high = jObj2 ["high"].toString(); + QString low = jObj2 ["low"].toString(); + QString date = jObj2 ["date"].toString(); + QString week = jObj2 ["week"].toString(); + QString type = jObj2 ["type"].toString(); + QJsonObject jObj23 = jObj2["air"].toObject(); + QString aqiname = jObj23 ["aqi_name"].toString(); + QString tip =jObj2["tip"].toString(); + QString info = city+" "+date+" "+week+" "+type+"\n温度:"+low+"-"+high+" 空气质量:"+aqiname; + ui->label_2->setWordWrap(true); + ui->label_2->setText("每日天气:\n\n"+info); + } + else { + // Display an error message + QMessageBox::warning(this, "Error", reply->errorString()); + } + + // Clean up + reply->deleteLater(); + manager->deleteLater(); + }); +} + +void MainWindow::everyEinglish() +{ + QNetworkAccessManager *manager = new QNetworkAccessManager(this); + QUrl url("api2url"); + QNetworkRequest request(url); + + // Set unsafe SSL configuration + QSslConfiguration config = request.sslConfiguration(); + config.setPeerVerifyMode(QSslSocket::VerifyNone); + request.setSslConfiguration(config); + + QNetworkReply *reply = manager->get(request); + + // Connect to the finished signal + connect(reply, &QNetworkReply::finished, [=]() { + if (reply->error() == QNetworkReply::NoError) { + // Read the JSON data + QByteArray data = reply->readAll(); + + // Display the JSON data in a message box + + QJsonDocument jsonDoc = QJsonDocument::fromJson(QString(data).toUtf8()); + QJsonObject jsonObj = jsonDoc.object(); + + QJsonObject jObj2 = jsonDoc["data"].toObject(); + QString key1Val = jObj2["zh"].toString(); + QString key1Val2 = jObj2["en"].toString(); + ui->label_3->setWordWrap(true); + ui->label_3->setText("每日英语:\n\n"+key1Val2); + // QMessageBox::information(this, "JSON Data", key1Val2); + + } else { + // Display an error message + QMessageBox::warning(this, "Error", reply->errorString()); + } + + // Clean up + reply->deleteLater(); + manager->deleteLater(); + }); +} + +void MainWindow::on_pushButton_3_clicked() +{ + // 获取信号的发送者 + QVBoxLayout* layout = ui->verticalLayout; + QLayoutItem* item; + while ((item = layout->takeAt(0)) != nullptr) { + if (item->widget()) { + delete item->widget(); + } + delete item; + } +} + diff --git a/mainwindow.h b/mainwindow.h new file mode 100644 index 0000000..fde4f80 --- /dev/null +++ b/mainwindow.h @@ -0,0 +1,39 @@ + +#ifndef MAINWINDOW_H +#define MAINWINDOW_H + +#include + +#include "dialog.h" +#include "ui_dialog.h" + +QT_BEGIN_NAMESPACE +namespace Ui { class MainWindow; } +QT_END_NAMESPACE + +class MainWindow : public QMainWindow + +{ + Q_OBJECT + +public: + MainWindow(QWidget *parent = nullptr); + ~MainWindow(); + +private slots: + void onNewButtonClicked(); + void on_pushButton_clicked(); + void restoreButtonSettings(); + void on_pushButton_2_clicked(); + void saveButtonSettings(); + void closeEvent(QCloseEvent*); + void everyday(); + void everyEinglish(); + void on_pushButton_3_clicked(); + + private: + Ui::MainWindow *ui; + +}; + +#endif // MAINWINDOW_H diff --git a/mainwindow.ui b/mainwindow.ui new file mode 100644 index 0000000..ee950c2 --- /dev/null +++ b/mainwindow.ui @@ -0,0 +1,135 @@ + + + MainWindow + + + + 0 + 0 + 633 + 382 + + + + MainWindow + + + + + + + + false + + + + 每日英语: + + + + + + + + 0 + 40 + + + + + 500 + 16777215 + + + + 添加设备 + + + + + + + + 16777215 + 16777215 + + + + 我的设备 + + + + + + + + + + + + 今日天气: + + + + + + + + 503 + 16777215 + + + + <html><head/><body><p><span style=" font-size:18pt;">万物互联IOT设备PC控制中心</span></p></body></html> + + + + + + + + 0 + 40 + + + + + 498 + 16777215 + + + + 检查更新 + + + + + + + + 0 + 40 + + + + 删除全部设备 + + + + + + + + + 0 + 0 + 633 + 18 + + + + + + + +