many changes :P

This commit is contained in:
kazu
2016-06-06 22:08:53 +02:00
parent db6b479d86
commit 6243165084
56 changed files with 4399 additions and 245 deletions

View File

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