added support for ground truth points: \n -layer for gt points \n -button with icon

-saving and loading support
This commit is contained in:
toni
2016-12-01 19:42:13 +01:00
parent 674f79c150
commit 1da9d916b3
12 changed files with 341 additions and 4 deletions

View File

@@ -0,0 +1,46 @@
#ifndef MMFLOORGROUNDTRUTHPOINTS_H
#define MMFLOORGROUNDTRUTHPOINTS_H
#include "MapLayer.h"
#include "MMFloorGroundTruthPoint.h"
#include <Indoor/floorplan/v2/Floorplan.h>
/**
* layer that contains all of one floor's GroundTruthPoints
*/
class MMFloorGroundTruthPoints : public MapLayer {
Floorplan::Floor* floor;
public:
/** ctor with the floor */
MMFloorGroundTruthPoints(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR_GROUND_TRUTH_POINTS), floor(floor) {
// the POIs
for (Floorplan::GroundTruthPoint* gtp : floor->gtpoints) {
elements.push_back(new MMFloorGroundTruthPoint(this, floor, gtp));
}
}
/** get the corresponding floor from the underlying model */
Floorplan::Floor* getFloor() {return floor;}
//TODO: check
void createGroundTruthPoint(Floorplan::GroundTruthPoint* gtp) {
// add to underlying model
floor->gtpoints.push_back(gtp);
// add to myself as element
elements.push_back(new MMFloorGroundTruthPoint(this, floor, gtp));
}
std::string getLayerName() const override {return "GroundTruthPoints";}
};
#endif // MMFLOORGROUNDTRUTHPOINTS_H