From 9070bf031de7758cd66c6b76a65839e102927fa8 Mon Sep 17 00:00:00 2001 From: yanxiaolong Date: Fri, 5 Mar 2021 16:59:26 +0800 Subject: [PATCH] zcx --- arm_show-build-Desktop-Debug/arm_show | Bin 3395153 -> 0 bytes arm_show-build-Desktop-Debug/mainwindow.o | Bin 891000 -> 0 bytes arm_show/mainwindow.cpp | 27 +++++++++++++++------------ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/arm_show-build-Desktop-Debug/arm_show b/arm_show-build-Desktop-Debug/arm_show index f93faa9..3f6304c 100755 Binary files a/arm_show-build-Desktop-Debug/arm_show and b/arm_show-build-Desktop-Debug/arm_show differ diff --git a/arm_show-build-Desktop-Debug/mainwindow.o b/arm_show-build-Desktop-Debug/mainwindow.o index 3c4dc23..ea6a747 100644 Binary files a/arm_show-build-Desktop-Debug/mainwindow.o and b/arm_show-build-Desktop-Debug/mainwindow.o differ diff --git a/arm_show/mainwindow.cpp b/arm_show/mainwindow.cpp index b7d8069..f4d2409 100755 --- a/arm_show/mainwindow.cpp +++ b/arm_show/mainwindow.cpp @@ -28,7 +28,7 @@ MainWindow::MainWindow(QWidget *parent) : configList << "gateWidth" << "gatewayId" <<"limitType" << "motorType" << "wingWall"; QTimer *timeStatus = new QTimer; connect(timeStatus, SIGNAL(timeout()), this, SLOT(timeStatus())); -// timeStatus->start(1000); + timeStatus->start(1000); // ui->lineEdit_2->setStyleSheet("border-image: url(:/new/image/battery.svg)"); } @@ -154,7 +154,7 @@ void MainWindow::analysisStatusMsg(QString recvDate) //解析socket server的 bool err_rpt; //声明一个json数据错误标识 QJson::Parser parser; QVariantMap clientRecvDocDate = parser.parse(recvDate.toLocal8Bit().data(), &err_rpt).toMap(); - qDebug()<OnlineIcon->setStyleSheet("border-image: url(:/new/image/break.svg)"); + // ui->OnlineIcon->setStyleSheet("border-image: url(:/new/image/break.svg)"); } } void MainWindow::setBatteryIcon() { - /* batEnergy 0-20; + /* batEnergy 0-20; * 20-40 * 40-60 * 60-80 *80-100 */ + int bat = batEnergy; + qDebug()<BatteryIcon->setStyleSheet("border-image: url(:/new/image/battery1.svg);"); } - else if(20 < batEnergy <= 40) + else if(20 < bat& bat <= 40) { ui->BatteryIcon->setStyleSheet("border-image: url(:/new/image/battery2.svg);"); } - else if(40 < batEnergy <= 60) + else if(40 < bat & bat<= 60) { ui->BatteryIcon->setStyleSheet("border-image: url(:/new/image/battery3.svg);"); } - else if(60 < batEnergy <= 80) + else if(60 < bat & bat<= 80) { ui->BatteryIcon->setStyleSheet("border-image: url(:/new/image/battery4.svg);"); } - else if(80 < batEnergy <= 100) + else if(80 < bat & bat<= 100) { ui->BatteryIcon->setStyleSheet("border-image: url(:/new/image/battery5.svg);"); } @@ -942,8 +945,8 @@ void MainWindow::on_parmConfigBtn_index_clicked() { if(original_Password == fd) { - ui->stackedWidget->setCurrentWidget(ui->parm_index); - setConfigDataEnable == FALSE; + ui->stackedWidget->setCurrentWidget(ui->parm_index); + setConfigDataEnable == FALSE; } else { @@ -1787,7 +1790,7 @@ void MainWindow::on_saveBtn_clicked() controlData.insert("data",contolDoc); bool ok; QByteArray json = serializer.serialize(controlData,&ok); - qDebug()<