current revision
This commit is contained in:
@@ -2,33 +2,58 @@
|
||||
|
||||
#include <QResizeEvent>
|
||||
|
||||
#include "map/MapView.h"
|
||||
#include "map/3D/MapView3D.h"
|
||||
#include "map/2D/MapView2D.h"
|
||||
|
||||
#include "menu/MainMenu.h"
|
||||
#include "debug/SensorDataWidget.h"
|
||||
#include "debug/InfoWidget.h"
|
||||
#include "UIHelper.h"
|
||||
|
||||
#include <QGridLayout>
|
||||
|
||||
MainWindow::MainWindow(QWidget *parent) : QWidget(parent) {
|
||||
|
||||
setMinimumHeight(500);
|
||||
setMinimumWidth(500);
|
||||
|
||||
mapView = new MapView(this);
|
||||
mapView3D = new MapView3D(this);
|
||||
mapView2D = new MapView2D(this);
|
||||
|
||||
mainMenu = new MainMenu(this);
|
||||
sensorWidget = new SensorDataWidget(this);
|
||||
infoWidget = new InfoWidget(this);
|
||||
sensorWidget = new SensorDataWidget(this); sensorWidget->setVisible(false);
|
||||
|
||||
//sensorWidget->setVisible(false);
|
||||
showMaximized();
|
||||
|
||||
sleep(1);
|
||||
emit resizeEvent(nullptr);
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::resizeEvent(QResizeEvent* event) {
|
||||
|
||||
const int w = event->size().width();
|
||||
const int h = event->size().height();
|
||||
const int w = this->width();
|
||||
const int h = this->height();
|
||||
|
||||
const int menuH = UIHelper::getMainMenuHeight(this);
|
||||
const int infoH = UIHelper::getInfoHeight(this);
|
||||
|
||||
int y = 0;
|
||||
|
||||
mainMenu->setGeometry(0,y,w,menuH); y += menuH;
|
||||
infoWidget->setGeometry(0,y,w,infoH); y += infoH;
|
||||
|
||||
mapView3D->setGeometry(0,y,w,h-y);
|
||||
mapView2D->setGeometry(0,y,w,h-y);
|
||||
|
||||
sensorWidget->setGeometry(0,y,w,h-y);
|
||||
|
||||
mainMenu->resizeEvent(event);
|
||||
mapView2D->resizeEvent(event);
|
||||
// infoWidget->resizeEvent(event);
|
||||
|
||||
mapView->setGeometry(0,0,w,h);
|
||||
mainMenu->setGeometry(0,0,w,64);
|
||||
sensorWidget->setGeometry(0,64,w,h-64);
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user