resolved some errors caused by a bad merge and new datatypes from indoor

This commit is contained in:
toni
2017-03-10 15:25:32 +01:00
parent 3d9d2a7529
commit 87d57ef134
4 changed files with 80 additions and 65 deletions

View File

@@ -93,21 +93,42 @@ MainController::MainController() {
connect(mw, &MainWindow::onGridShowEdges, [&] (const bool show) {mw->getMapView3D()->getGridRenderer()->setShowEdges(show);} );
mapModel->load("../IndoorMap/maps/SHL26.xml");
//mapModel->load("../IndoorMap/maps/SHL26.xml");
//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->startEmpty();
mapModel->startEmpty();
}
void MainController::onLayerChanged(MapLayer* layer) {
(void) layer;
mw->getMapView2D()->update();
mw->getMapView3D()->update();
}
void MainController::onLayerElementAdded(MapLayer* layer, MapModelElement* elem) {
(void) layer;
mapSelector->focus(mw->getMapView2D(), elem);
}
void MainController::onLayerElementRemoved(MapLayer* layer, const MapModelElement* elem) {
(void) layer;
(void) elem;
}
void MainController::onLayerVisibilityChanged(MapLayer *layer, const bool visible) {
(void) layer;
(void) visible;
}
void MainController::onShow3DFloorplan() {
mw->getMapView3D()->showFloorplan();
}
@@ -125,7 +146,6 @@ void MainController::layerSelected(QModelIndex idx) {
mw->getLayerParamWidget()->setElement(ml);
mw->getToolBoxWidget()->setSelectedLayer(ml);
}
void MainController::curMapElementChanged() {
mw->getElementParamWidget()->refresh();
}
@@ -149,7 +169,6 @@ void MainController::onMapModelReset() {
}
void MainController::onLoad() {
QString file = QFileDialog::getOpenFileName(mw, "open a map");
if (file != "") {
mapModel->load(file.toStdString());
@@ -157,12 +176,8 @@ void MainController::onLoad() {
}
void MainController::onSave() {
QString file = QFileDialog::getSaveFileName(mw, "save the map");
if (file != "") {
mapModel->save(file.toStdString());
}
}

View File

@@ -30,8 +30,8 @@ public:
}
/** get the element's minimal distance (nearest whatsoever) to the given point */
float getMinDistanceXY(const Point2 p) const override {
return p.getDistance(gtp->pos);
ClickDist getMinDistanceXY(const Point2 p) const override {
return ClickDist(p.getDistance(gtp->pos), ClickDistType::DIRECT);
}
/** repaint me */

View File

@@ -20,7 +20,7 @@ public:
// the POIs
for (Floorplan::GroundTruthPoint* gtp : floor->gtpoints) {
elements.push_back(new MMFloorGroundTruthPoint(this, floor, gtp));
addElement(new MMFloorGroundTruthPoint(this, floor, gtp));
}
}
@@ -35,7 +35,7 @@ public:
floor->gtpoints.push_back(gtp);
// add to myself as element
elements.push_back(new MMFloorGroundTruthPoint(this, floor, gtp));
addElement(new MMFloorGroundTruthPoint(this, floor, gtp));
}