Browse Source

change RemoteCtr_Three. add status groupbox.

yuchuli 2 years ago
parent
commit
c948d592fa

+ 42 - 14
src/tool/RemoteCtrl_Wide/mainwindowcenter.cpp

@@ -203,13 +203,6 @@ MainWindow::~MainWindow()
 
 void MainWindow::CreateView()
 {
-//    mMapview = new QWebEngineView(ui->centralwidget);
-//    qDebug((QDir::currentPath()).toLatin1().data());
-//    mMapview->load(QUrl(QString("file:///%1/%2").arg(QApplication::applicationDirPath()).arg("BaiDuMap.html")));
-
- //   mMapview->setGeometry(10,10,800,800);
-
-//    mMapview->page()->runJavaScript("theLocation(117.355,39.066);");  //117.355,39.066
 
     mpWheel = new Speed(ui->groupBox_rem);
     mpWheel->settitle(QStringLiteral("方向盘"));
@@ -261,7 +254,6 @@ void MainWindow::CreateView()
     ui->radioButton_Null->setChecked(true);
 
 
-
 }
 
 
@@ -365,7 +357,7 @@ void MainWindow::resizeEvent(QResizeEvent *event)
 
 
         int groupmap_x = 0;
-        int groupmap_y = 0;
+        int groupmap_y = nfrontpos_y;
         int groupmap_width = nfrontpos_x;
         int groupmap_height = 100;
 
@@ -375,9 +367,9 @@ void MainWindow::resizeEvent(QResizeEvent *event)
         ui->groupBox_map->setGeometry(groupmap_x,groupmap_y,groupmap_width,groupmap_height);
 
         int groupgps_x = 0;
-        int groupgps_y = nfrontpos_y;
+        int groupgps_y = nfrontpos_y + groupmap_height;
         int groupgps_width = nfrontpos_x;
-        int groupgps_height = nfrontsize_y;
+        int groupgps_height = nfrontsize_y - groupmap_height;
 
         ui->groupBox_gps->setGeometry(groupgps_x,groupgps_y,groupgps_width,groupgps_height);
 
@@ -422,6 +414,42 @@ void MainWindow::resizeEvent(QResizeEvent *event)
         mpVehSpeed->setVisible(true);
         mpVehSpeed->setGeometry(grouppos_x,0,nvehwidth,nvehwidth);
 
+        int nstatus_x = 0;
+        int nstatus_y = 0;
+        int nstatus_height = nrearsize_y;
+        int nstatus_width = nrearpos_x;
+        if(nstatus_width>600)nstatus_width = 600;
+
+
+        ui->groupBox_Status->setGeometry(nstatus_x,nstatus_y,nstatus_width,nstatus_height);
+
+        lablewidth =nstatus_width*1/10;// (groupgps_width-50)*2/10;
+        lewidth = nstatus_width*3/10;
+        leheight = 26;
+
+        nypos = 40;
+        ui->label_Status_Connect->setGeometry(10,nypos,lablewidth,leheight);
+        ui->lineEdit_Status_Connect->setGeometry(20+lablewidth,nypos,lewidth,leheight);
+
+        ui->label_Status_Vehicle->setGeometry(10+nstatus_width/2,nypos,lablewidth,leheight);
+        ui->lineEdit_Status_Vehicle->setGeometry(20+nstatus_width/2 + lablewidth,nypos,lewidth,leheight);
+
+        nypos = nypos + leheight*11/10;
+
+        ui->label_Status_Front->setGeometry(10,nypos,lablewidth,leheight);
+        ui->lineEdit_Status_Front->setGeometry(20+lablewidth,nypos,lewidth,leheight);
+
+        ui->label_Status_Rear->setGeometry(10+nstatus_width/2,nypos,lablewidth,leheight);
+        ui->lineEdit_Status_Rear->setGeometry(20+nstatus_width/2 + lablewidth,nypos,lewidth,leheight);
+
+        nypos = nypos + leheight*11/10;
+
+        ui->label_Status_Left->setGeometry(10,nypos,lablewidth,leheight);
+        ui->lineEdit_Status_Left->setGeometry(20+lablewidth,nypos,lewidth,leheight);
+
+        ui->label_Status_Right->setGeometry(10+nstatus_width/2,nypos,lablewidth,leheight);
+        ui->lineEdit_Status_Right->setGeometry(20+nstatus_width/2 + lablewidth,nypos,lewidth,leheight);
+
 
         double fscale = nfrontsize_x*0.99/mnframewidth;
         double fscale2 = nrearsize_x*0.99/mnframewidth;
@@ -872,9 +900,9 @@ void MainWindow::paintEvent(QPaintEvent *)
     }
     if(mnDraw>0)
     {
-        mpainter_background  = new QPainter(this);
-        mpainter_background->drawPixmap(0, 0, this->width(), this->height(), QPixmap(":/pic/background2.jpg"));
-        delete mpainter_background;
+//        mpainter_background  = new QPainter(this);
+//        mpainter_background->drawPixmap(0, 0, this->width(), this->height(), QPixmap(":/pic/background2.jpg"));
+//        delete mpainter_background;
         mnDraw--;
     }
 

+ 160 - 0
src/tool/RemoteCtrl_Wide/mainwindowcenter.ui

@@ -60,6 +60,9 @@
       <height>311</height>
      </rect>
     </property>
+    <property name="styleSheet">
+     <string notr="true"/>
+    </property>
     <property name="title">
      <string>Control</string>
     </property>
@@ -177,6 +180,9 @@
       <height>121</height>
      </rect>
     </property>
+    <property name="styleSheet">
+     <string notr="true"/>
+    </property>
     <property name="title">
      <string>Map</string>
     </property>
@@ -213,6 +219,9 @@
       <height>351</height>
      </rect>
     </property>
+    <property name="styleSheet">
+     <string notr="true"/>
+    </property>
     <property name="title">
      <string>GPS</string>
     </property>
@@ -401,6 +410,157 @@
      </property>
     </widget>
    </widget>
+   <widget class="QGroupBox" name="groupBox_Status">
+    <property name="geometry">
+     <rect>
+      <x>0</x>
+      <y>0</y>
+      <width>471</width>
+      <height>121</height>
+     </rect>
+    </property>
+    <property name="title">
+     <string>Status</string>
+    </property>
+    <widget class="QLineEdit" name="lineEdit_Status_Connect">
+     <property name="geometry">
+      <rect>
+       <x>87</x>
+       <y>30</y>
+       <width>81</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_Status_Connect">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>30</y>
+       <width>67</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Connect</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_Status_Vehicle">
+     <property name="geometry">
+      <rect>
+       <x>230</x>
+       <y>30</y>
+       <width>67</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Vehicle</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_Status_Vehicle">
+     <property name="geometry">
+      <rect>
+       <x>310</x>
+       <y>30</y>
+       <width>81</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_Status_Front">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>60</y>
+       <width>67</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Front</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_Status_Rear">
+     <property name="geometry">
+      <rect>
+       <x>230</x>
+       <y>60</y>
+       <width>67</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Rear</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_Status_Left">
+     <property name="geometry">
+      <rect>
+       <x>10</x>
+       <y>90</y>
+       <width>67</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Left</string>
+     </property>
+    </widget>
+    <widget class="QLabel" name="label_Status_Right">
+     <property name="geometry">
+      <rect>
+       <x>230</x>
+       <y>90</y>
+       <width>67</width>
+       <height>17</height>
+      </rect>
+     </property>
+     <property name="text">
+      <string>Right</string>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_Status_Front">
+     <property name="geometry">
+      <rect>
+       <x>88</x>
+       <y>60</y>
+       <width>81</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_Status_Rear">
+     <property name="geometry">
+      <rect>
+       <x>310</x>
+       <y>60</y>
+       <width>81</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_Status_Left">
+     <property name="geometry">
+      <rect>
+       <x>90</x>
+       <y>90</y>
+       <width>81</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+    <widget class="QLineEdit" name="lineEdit_Status_Right">
+     <property name="geometry">
+      <rect>
+       <x>310</x>
+       <y>90</y>
+       <width>81</width>
+       <height>25</height>
+      </rect>
+     </property>
+    </widget>
+   </widget>
   </widget>
   <widget class="QMenuBar" name="menubar">
    <property name="geometry">