Merge branch 'master' of https://git.frank-ebner.de/FHWS/IndoorMap
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
MainController::MainController() {
|
||||
|
||||
// Floorplan::Meta* meta = new Floorplan::Meta();
|
||||
@@ -93,101 +94,94 @@ MainController::MainController() {
|
||||
connect(mw, &MainWindow::onGridShowEdges, [&] (const bool show) {mw->getMapView3D()->getGridRenderer()->setShowEdges(show);} );
|
||||
|
||||
|
||||
mapModel->load("../IndoorMap/maps/SHL28.xml");
|
||||
mapModel->load("../IndoorMap/maps/SHL32.xml");
|
||||
//mapModel->resize(0.983, 0.983, 1, -0.2, -0.3, 0);
|
||||
|
||||
|
||||
//mapModel->load("../IndoorMap/maps/test.xml");
|
||||
//mapModel->load("../IndoorMap/maps/APs.xml");
|
||||
|
||||
//mapModel->load("/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/CAR/CAR9.xml");
|
||||
//mapModel->load("/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/UAH/UAH9.xml");
|
||||
//mapModel->load("/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/UAH/UAH9.xml");
|
||||
//mapModel->load("/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/UJI-TI/UJI-TI4.xml");
|
||||
//mapModel->load("/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/UJI-UB/UJI-UB4.xml");
|
||||
//mapModel->load("/mnt/data/workspaces/Indoor/tests/data/WalkHeadingMap.xml");
|
||||
//mapModel->load("/mnt/data/workspaces/IPIN2016/IPIN2016/competition/maps/test.xml");
|
||||
//mapModel->load("/mnt/vm/workspace/IRGame/IndoorServer/maps/map6.xml");
|
||||
//mapModel->load("/mnt/vm/workspace/IRGame/IndoorServer/maps/keller1.xml");
|
||||
//mapModel->load("/mnt/vm/workspace/IRGame/IndoorServer/maps/wohnung4.xml");
|
||||
|
||||
//mapModel->startEmpty();
|
||||
// mapModel->startEmpty();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void MainController::onLayerChanged(MapLayer* layer) {
|
||||
(void) layer;
|
||||
mw->getMapView2D()->update();
|
||||
mw->getMapView3D()->update();
|
||||
(void) layer;
|
||||
mw->getMapView2D()->update();
|
||||
mw->getMapView3D()->update();
|
||||
}
|
||||
|
||||
void MainController::onLayerElementAdded(MapLayer* layer, MapModelElement* elem) {
|
||||
(void) layer;
|
||||
mapSelector->focus(mw->getMapView2D(), elem);
|
||||
(void) layer;
|
||||
mapSelector->focus(mw->getMapView2D(), elem);
|
||||
}
|
||||
|
||||
void MainController::onLayerElementRemoved(MapLayer* layer, const MapModelElement* elem) {
|
||||
(void) layer;
|
||||
(void) elem;
|
||||
(void) layer;
|
||||
(void) elem;
|
||||
}
|
||||
|
||||
void MainController::onLayerVisibilityChanged(MapLayer *layer, const bool visible) {
|
||||
(void) layer;
|
||||
(void) visible;
|
||||
(void) layer;
|
||||
(void) visible;
|
||||
}
|
||||
|
||||
void MainController::onShow3DFloorplan() {
|
||||
mw->getMapView3D()->showFloorplan();
|
||||
mw->getMapView3D()->showFloorplan();
|
||||
}
|
||||
|
||||
void MainController::onShow3DGrid() {
|
||||
mw->getMapView3D()->showGrid();
|
||||
mw->getMapView3D()->showGrid();
|
||||
}
|
||||
|
||||
void MainController::layerSelected(QModelIndex idx) {
|
||||
mw->getMapView2D()->layerChange();
|
||||
MapLayer* ml = static_cast<MapLayer*>(idx.internalPointer());
|
||||
mapModel->setSelectedLayer(ml);
|
||||
mw->getMapView2D()->layerChange();
|
||||
mw->getMapView3D()->layerChange();
|
||||
mw->getLayerParamWidget()->setElement(ml);
|
||||
mw->getToolBoxWidget()->setSelectedLayer(ml);
|
||||
mw->getMapView2D()->layerChange();
|
||||
MapLayer* ml = static_cast<MapLayer*>(idx.internalPointer());
|
||||
mapModel->setSelectedLayer(ml);
|
||||
mw->getMapView2D()->layerChange();
|
||||
mw->getMapView3D()->layerChange();
|
||||
mw->getLayerParamWidget()->setElement(ml);
|
||||
mw->getToolBoxWidget()->setSelectedLayer(ml);
|
||||
}
|
||||
|
||||
void MainController::curMapElementChanged() {
|
||||
mw->getElementParamWidget()->refresh();
|
||||
mw->getElementParamWidget()->refresh();
|
||||
}
|
||||
|
||||
void MainController::mapElementSelected(MapModelElement* el) {
|
||||
mw->getElementParamWidget()->setElement(el);
|
||||
mw->getElementParamWidget()->setElement(el);
|
||||
}
|
||||
|
||||
void MainController::onMapModelAboutToReset() {
|
||||
mw->getLayerParamWidget()->setElement(nullptr);
|
||||
mw->getToolBoxWidget()->setSelectedLayer(nullptr);
|
||||
mw->getMapView2D()->update();
|
||||
mw->getLayerParamWidget()->setElement(nullptr);
|
||||
mw->getToolBoxWidget()->setSelectedLayer(nullptr);
|
||||
mw->getMapView2D()->update();
|
||||
}
|
||||
|
||||
void MainController::onMapModelNeedsRepaint() {
|
||||
mw->getMapView2D()->update();
|
||||
mw->getMapView2D()->update();
|
||||
}
|
||||
|
||||
void MainController::onMapModelReset() {
|
||||
mw->getTree()->expandAll();
|
||||
mw->getTree()->expandAll();
|
||||
}
|
||||
|
||||
void MainController::onLoad() {
|
||||
|
||||
QString file = QFileDialog::getOpenFileName(mw, "open a map");
|
||||
if (file != "") {
|
||||
mapModel->load(file.toStdString());
|
||||
}
|
||||
QString file = QFileDialog::getOpenFileName(mw, "open a map");
|
||||
if (file != "") {
|
||||
mapModel->load(file.toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
void MainController::onSave() {
|
||||
|
||||
QString file = QFileDialog::getSaveFileName(mw, "save the map");
|
||||
if (file != "") {
|
||||
mapModel->save(file.toStdString());
|
||||
}
|
||||
|
||||
QString file = QFileDialog::getSaveFileName(mw, "save the map");
|
||||
if (file != "") {
|
||||
mapModel->save(file.toStdString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user