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/MMFloors.h
kazu 535e410ae9 added new param-editing to APs and Beacons
changed drawing for better debuging
changed layer editing
option to add and delete layers
some minor changes
2016-11-29 21:31:20 +01:00

54 lines
987 B
C++

#ifndef MMFLOORS_H
#define MMFLOORS_H
#include "MapLayer.h"
#include "MMFloor.h"
#include <Indoor/floorplan/v2/Floorplan.h>
/**
* layer containing all of the map's floors
*/
class MMFloors : public MapLayer {
private:
Floorplan::IndoorMap* map;
public:
/** ctor with the underlying model */
MMFloors(MapLayer* parent, Floorplan::IndoorMap* map) : MapLayer(parent, MapLayerType::FLOORS), map(map) {
// add all floors
for (Floorplan::Floor* floor : map->floors) {
new MMFloor(this, map, floor);
}
}
std::string getLayerName() const override {return "floors";}
/** get the underlying model */
Floorplan::IndoorMap* getMap() {return map;}
MMFloor* createFloor() {
// add to underlying model
Floorplan::Floor* floor = new Floorplan::Floor();
floor->name = "floor";
map->floors.push_back(floor);
// add to UI model
MMFloor* mmfloor = new MMFloor(this, map, floor);
//elements.push_back(mmfloor);
return mmfloor;
}
};
#endif // MMFLOORS_H