|
@@ -346,44 +346,58 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
QSize sizemain = ui->centralwidget->size();
|
|
|
qDebug("size x = %d y=%d",sizemain.width(),sizemain.height());
|
|
|
|
|
|
- mMapview->setGeometry(10,10,sizemain.width()/2,sizemain.height()*3/5);
|
|
|
+ mMapview->setVisible(false);
|
|
|
+// mMapview->setGeometry(10,10,sizemain.width()/2,sizemain.height()*3/5);
|
|
|
|
|
|
// mpbaiduapp->SetGeometry(10,30,sizemain.width()/2,sizemain.height()*3/5);
|
|
|
|
|
|
mmyview->setGeometry(10+sizemain.width()/2+10,10,sizemain.width()/2-30,sizemain.height()*3/5);
|
|
|
|
|
|
+ int nfrontpos_x = sizemain.width()/6;
|
|
|
+ int nfrontpos_y = sizemain.height()/3;
|
|
|
+ int nfrontsize_x = sizemain.width()*2/3;
|
|
|
+ int nfrontsize_y = sizemain.height() * 2/3;
|
|
|
+ mmyview->setGeometry(nfrontpos_x,nfrontpos_y,nfrontsize_x,nfrontsize_y);
|
|
|
+
|
|
|
// mppicshow->SetGeometry(10+sizemain.width()/2+10,10,sizemain.width()/2-30,sizemain.height()*3/5);
|
|
|
|
|
|
- ui->lineEdit_lat->setGeometry(sizemain.width()-100,10,90,30);
|
|
|
- ui->lineEdit_lon->setGeometry(sizemain.width()-100,50,90,30);
|
|
|
- ui->pushButton_test->setGeometry(sizemain.width()-100,90,90,30);
|
|
|
+// ui->lineEdit_lat->setGeometry(sizemain.width()-100,10,90,30);
|
|
|
+// ui->lineEdit_lon->setGeometry(sizemain.width()-100,50,90,30);
|
|
|
+// ui->pushButton_test->setGeometry(sizemain.width()-100,90,90,30);
|
|
|
+
|
|
|
|
|
|
+ ui->lineEdit_lat->setVisible(false);
|
|
|
+ ui->lineEdit_lon->setVisible(false);
|
|
|
+ ui->pushButton_test->setVisible(false);
|
|
|
// mpWheel->setGeometry(sizemain.width()/2 + 20,10,200,200);
|
|
|
|
|
|
- int grouppos_x = 10;
|
|
|
- int grouppos_y = 20 + sizemain.height() *3/5;
|
|
|
- int grouppos_width = sizemain.width()*6/10;
|
|
|
- int grouppos_height = sizemain.height()*2/5 - 20;
|
|
|
+ int grouppos_x = sizemain.width()*5/6;
|
|
|
+ int grouppos_y = sizemain.height()/3;
|
|
|
+ int grouppos_width = sizemain.width()*1/6;
|
|
|
+ int grouppos_height = sizemain.height() * 2/3;
|
|
|
|
|
|
|
|
|
- int speed_width = grouppos_height-40;
|
|
|
- if((speed_width*3 + 150)>grouppos_width)speed_width = (grouppos_width - 150)/3;
|
|
|
+// int speed_width = grouppos_height-40;
|
|
|
+// if((speed_width*3 + 150)>grouppos_width)speed_width = (grouppos_width - 150)/3;
|
|
|
|
|
|
- mpWheel->setGeometry(100,30,speed_width,speed_width);
|
|
|
- mpBrake->setGeometry(120 + speed_width,30,speed_width,speed_width);
|
|
|
- mpAcc->setGeometry(140 + 2*speed_width,30,speed_width,speed_width);
|
|
|
+ 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);
|
|
|
ui->groupBox_rem->setGeometry(grouppos_x,grouppos_y,grouppos_width,grouppos_height);
|
|
|
|
|
|
- int grouppic_x = 10 + sizemain.width()*6/10 + 10;
|
|
|
- int grouppic_y = 20 + sizemain.height() *3/5;
|
|
|
- int grouppic_width = sizemain.width()*4/10 - 30;
|
|
|
- int grouppic_height = sizemain.height()*1/10;
|
|
|
+// int grouppic_x = 10 + sizemain.width()*6/10 + 10;
|
|
|
+// int grouppic_y = 20 + sizemain.height() *3/5;
|
|
|
+// int grouppic_width = sizemain.width()*4/10 - 30;
|
|
|
+// int grouppic_height = sizemain.height()*1/10;
|
|
|
|
|
|
- ui->groupBox_picsel->setGeometry(grouppic_x,grouppic_y,grouppic_width,grouppic_height);
|
|
|
+// ui->groupBox_picsel->setGeometry(grouppic_x,grouppic_y,grouppic_width,grouppic_height);
|
|
|
+ ui->groupBox_picsel->setVisible(false);
|
|
|
|
|
|
- int groupmap_x = 10 + sizemain.width()*6/10 + 10;
|
|
|
- int groupmap_y = 20 + sizemain.height() *7/10;
|
|
|
- int groupmap_width = sizemain.width()*4/10 - 30;
|
|
|
+ int groupmap_x = 0;
|
|
|
+ int groupmap_y = sizemain.height()*1/3;
|
|
|
+ int groupmap_width = sizemain.width()/6;
|
|
|
int groupmap_height = sizemain.height()*1/10;
|
|
|
|
|
|
ui->comboBox_Station->setGeometry(10,30,groupmap_width*3/5,30);
|
|
@@ -391,10 +405,10 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
|
|
|
ui->groupBox_map->setGeometry(groupmap_x,groupmap_y,groupmap_width,groupmap_height);
|
|
|
|
|
|
- int groupgps_x = 10 + sizemain.width()*6/10 + 10;
|
|
|
- int groupgps_y = 30 + sizemain.height() *8/10;
|
|
|
- int groupgps_width = sizemain.width()*4/10 - 30;
|
|
|
- int groupgps_height = sizemain.height()*2/10 - 30;
|
|
|
+ int groupgps_x = 0;
|
|
|
+ int groupgps_y = sizemain.height()/2;
|
|
|
+ int groupgps_width = sizemain.width()/6;
|
|
|
+ int groupgps_height = sizemain.height()/2;
|
|
|
|
|
|
ui->groupBox_gps->setGeometry(groupgps_x,groupgps_y,groupgps_width,groupgps_height);
|
|
|
|
|
@@ -427,6 +441,10 @@ void MainWindow::resizeEvent(QResizeEvent *event)
|
|
|
ui->lineEdit_gpssat->setGeometry(40+2*lablewidth +lewidth,nypos,lewidth,leheight);
|
|
|
|
|
|
|
|
|
+ double fscale = (sizemain.width()*2/3)/1920.0;
|
|
|
+ double fscale2 = (sizemain.height()*2/3)/1080.0;
|
|
|
+ if(fscale > fscale2) fscale = fscale2;
|
|
|
+ mmyview->viewscaleto(fscale);
|
|
|
}
|
|
|
|
|
|
|