This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
IndoorMap/mapview/model/MMFloorPOIs.h
2016-06-06 22:08:53 +02:00

47 lines
940 B
C++

#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