|
@@ -299,6 +299,14 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
|
|
|
int nMode = 1;
|
|
|
|
|
|
+ if(sizemain.height()>0)
|
|
|
+ {
|
|
|
+ if((sizemain.width()/sizemain.height())<3)
|
|
|
+ {
|
|
|
+ nMode = 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
ui->lineEdit_lat->setVisible(false);
|
|
|
ui->lineEdit_lon->setVisible(false);
|
|
|
ui->pushButton_test->setVisible(false);
|
|
@@ -472,27 +480,27 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
// mpWheel->setGeometry(sizemain.width()/2 + 20,10,200,200);
|
|
|
|
|
|
int grouppos_x = sizemain.width()*1/5;
|
|
|
- int grouppos_y = sizemain.height()/2;
|
|
|
+ int grouppos_y = 260;
|
|
|
int grouppos_width = sizemain.width()*1/5;
|
|
|
- int grouppos_height = sizemain.height() * 1/2;
|
|
|
+ int grouppos_height = sizemain.height() -260;
|
|
|
|
|
|
|
|
|
// int speed_width = grouppos_height-40;
|
|
|
// if((speed_width*3 + 150)>grouppos_width)speed_width = (grouppos_width - 150)/3;
|
|
|
|
|
|
- int speed_width = grouppos_width;
|
|
|
- if(speed_width*3 > (sizemain.height()/2))speed_width = sizemain.height()/6;
|
|
|
- mpWheel->setGeometry(0,sizemain.height()/6 ,speed_width,speed_width);
|
|
|
- mpBrake->setGeometry(0,sizemain.height()/6 + sizemain.height()/6,speed_width,speed_width);
|
|
|
- mpAcc->setGeometry(0 ,sizemain.height()/6 + sizemain.height()/3,speed_width,speed_width);
|
|
|
+ int speed_width = grouppos_height - 130;
|
|
|
+ if(speed_width*3 > (sizemain.width()*1/5))speed_width = (sizemain.width()*1/5)/3;
|
|
|
+ mpWheel->setGeometry(0,130 ,speed_width,speed_width);
|
|
|
+ mpBrake->setGeometry(grouppos_width*1/3,130,speed_width,speed_width);
|
|
|
+ mpAcc->setGeometry(grouppos_width*2/3 ,130,speed_width,speed_width);
|
|
|
ui->groupBox_rem->setGeometry(grouppos_x,grouppos_y,grouppos_width,grouppos_height);
|
|
|
|
|
|
|
|
|
|
|
|
int groupmap_x = sizemain.width()*1/5;
|
|
|
- int groupmap_y = sizemain.height();
|
|
|
+ int groupmap_y = 0;//sizemain.height();
|
|
|
int groupmap_width = sizemain.width()/5;
|
|
|
- int groupmap_height = sizemain.height();
|
|
|
+ int groupmap_height = 80;// sizemain.height();
|
|
|
|
|
|
ui->comboBox_Station->setGeometry(10,30,groupmap_width*3/5,30);
|
|
|
ui->pushButton_Go->setGeometry(20 + groupmap_width*3/5,30,groupmap_width*2/5 - 30,30);
|
|
@@ -500,47 +508,49 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
ui->groupBox_map->setGeometry(groupmap_x,groupmap_y,groupmap_width,groupmap_height);
|
|
|
|
|
|
int groupgps_x = sizemain.width()*1/5;
|
|
|
- int groupgps_y = sizemain.height()/2;
|
|
|
+ int groupgps_y = 80;//sizemain.height()/2;
|
|
|
int groupgps_width = sizemain.width()/5;
|
|
|
- int groupgps_height = sizemain.height()/2;
|
|
|
+ int groupgps_height = 160;//sizemain.height()/2;
|
|
|
|
|
|
- ui->groupBox_gps->setGeometry(groupgps_x,groupgps_y,groupgps_width,groupgps_height);
|
|
|
|
|
|
- int lablewidth =groupgps_width*3/10;// (groupgps_width-50)*2/10;
|
|
|
- int lewidth = groupgps_width*6/10;
|
|
|
+ int lablewidth =groupgps_width*3/20;// (groupgps_width-50)*2/10;
|
|
|
+ int lewidth = groupgps_width*5/20;
|
|
|
int leheight = 26;
|
|
|
|
|
|
+ ui->groupBox_gps->setGeometry(groupgps_x,groupgps_y,groupgps_width,groupgps_height);
|
|
|
+
|
|
|
+
|
|
|
int nypos = 40;
|
|
|
ui->label_gpsins->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
ui->lineEdit_gpsins->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
- nypos = nypos + leheight*11/10;
|
|
|
- ui->label_gpsrtk->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
- ui->lineEdit_gpsrtk->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
+ // nypos = nypos + leheight*11/10;
|
|
|
+ ui->label_gpsrtk->setGeometry(groupgps_width/2,nypos,lablewidth,leheight);
|
|
|
+ ui->lineEdit_gpsrtk->setGeometry(groupgps_width/2+10+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
nypos = nypos + leheight*11/10;
|
|
|
ui->label_gpslon->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
ui->lineEdit_gpslon->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
- nypos = nypos + leheight*11/10;
|
|
|
- ui->label_gpslat->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
- ui->lineEdit_gpslat->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
+ // nypos = nypos + leheight*11/10;
|
|
|
+ ui->label_gpslat->setGeometry(groupgps_width/2,nypos,lablewidth,leheight);
|
|
|
+ ui->lineEdit_gpslat->setGeometry(groupgps_width/2+10+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
nypos = nypos + leheight*11/10;
|
|
|
ui->label_gpsheading->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
ui->lineEdit_gpsheading->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
- nypos = nypos + leheight*11/10;
|
|
|
- ui->label_gpsheight->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
- ui->lineEdit_gpsheight->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
+// nypos = nypos + leheight*11/10;
|
|
|
+ ui->label_gpsheight->setGeometry(groupgps_width/2,nypos,lablewidth,leheight);
|
|
|
+ ui->lineEdit_gpsheight->setGeometry(groupgps_width/2+10+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
nypos = nypos + leheight*11/10;
|
|
|
ui->label_gpsspeed->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
ui->lineEdit_gpsspeed->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
- nypos = nypos + leheight*11/10;
|
|
|
- ui->label_gpssat->setGeometry(10,nypos,lablewidth,leheight);
|
|
|
- ui->lineEdit_gpssat->setGeometry(20+lablewidth,nypos,lewidth,leheight);
|
|
|
+ // nypos = nypos + leheight*11/10;
|
|
|
+ ui->label_gpssat->setGeometry(groupgps_width/2,nypos,lablewidth,leheight);
|
|
|
+ ui->lineEdit_gpssat->setGeometry(groupgps_width/2+10+lablewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
|
|
|
double fscale = (sizemain.width()*1/5)*1.0/mnframewidth;
|
|
@@ -1183,6 +1193,15 @@ void MainWindow::threadpic(int ncampos)
|
|
|
int cx = pbuf->framewidth;
|
|
|
cv::Mat rgbImg(cy, cx,CV_8UC3);
|
|
|
|
|
|
+ if((cy!=mnframeheight) || (cx != mnframewidth))
|
|
|
+ {
|
|
|
+ mnframeheight = cy;
|
|
|
+ mnframewidth = cx;
|
|
|
+ resizeEvent(NULL);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
#ifndef USE_QSV
|
|
|
cv::cvtColor(pbuf->myuvImg, rgbImg, CV_YUV2RGB_I420);
|
|
|
#endif
|