|
@@ -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--;
|
|
|
}
|
|
|
|