Explorar o código

(未测试)增加qt输入三相数据显示功能

chenyj hai 1 ano
pai
achega
249e252eb1
Modificáronse 5 ficheiros con 13 adicións e 3 borrados
  1. BIN=BIN
      Qt/Qt_Test/Qt_Test
  2. 1 1
      Qt/Qt_Test/Qt_Test.pro.user
  3. 3 1
      Qt/Qt_Test/pdu_ctrl.cpp
  4. 1 0
      Qt/Qt_Test/pdu_ctrl.h
  5. 8 1
      Qt/Qt_Test/widget.cpp

BIN=BIN
Qt/Qt_Test/Qt_Test


+ 1 - 1
Qt/Qt_Test/Qt_Test.pro.user

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!DOCTYPE QtCreatorProject>
-<!-- Written by QtCreator 4.5.2, 2024-08-29T12:00:12. -->
+<!-- Written by QtCreator 4.5.2, 2024-11-03T19:55:33. -->
 <qtcreator>
  <data>
   <variable>EnvironmentId</variable>

+ 3 - 1
Qt/Qt_Test/pdu_ctrl.cpp

@@ -200,10 +200,12 @@ void pdu_Ctrl::Main_FunBtnSet(BtnDownType nbtnType)
             int nNowIndex=m_pWidget->getShowPagIndex();
             qDebug()<<"NowIndex="<<nNowIndex;
             switch (nNowIndex) {
+            case 1:
             case 2://CH通道界面如果是三项则切换至三项子通道界面
                 {
                     if(isT_ACType)
                     {
+                        lastACIndex=nNowIndex;
                         m_pWidget->setShowPHIndex(1);
                         ChangeView(widgetType_Main,4);
                     }
@@ -212,7 +214,7 @@ void pdu_Ctrl::Main_FunBtnSet(BtnDownType nbtnType)
             case 4://PH通道界面返回CH通道界面
                 {
                     m_pWidget->setShowPHIndex(0);
-                    ChangeView(widgetType_Main,2);
+                    ChangeView(widgetType_Main,lastACIndex);
                 }
                 break;
             default://其他界面

+ 1 - 0
Qt/Qt_Test/pdu_ctrl.h

@@ -142,6 +142,7 @@ public:
     QString strSqliteAddress;
 
     bool isT_ACType;
+    int lastACIndex;
 };
 
 #endif // PDU_CTRL_H

+ 8 - 1
Qt/Qt_Test/widget.cpp

@@ -178,8 +178,15 @@ void Widget::setPH(int nIndex,int nPHType)
     default:
         break;
     }
-    QString  strPHShow=QString("Output CH%1%2").arg(nIndex).arg(strShow);
 
+    QString  strPHShow="";
+    if(nIndex<=0)
+    {
+        strPHShow=QString("Input Vol%1").arg(strShow);
+    }else
+    {
+        strPHShow=QString("Output CH%1%2").arg(nIndex).arg(strShow);
+    }
     SetData(ui->label_18,strPHShow);
 }
 /*