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/MMFloorStairs.h
kazu f40fc9a823 added a ruler for measuring
added support for meta-data editing
improved element selection
changed zooming
fixed some issues with layer events
fixed issue with 3D outline
fixed loading issue for old maps
some interface changes
2017-03-10 13:44:17 +01:00

49 lines
961 B
C++

#ifndef MMFLOORSTAIRS_H
#define MMFLOORSTAIRS_H
#include "MapLayer.h"
#include "MMFloorStair.h"
#include <Indoor/floorplan/v2/Floorplan.h>
/**
* layer containing all stairs of one floor
*/
class MMFloorStairs : public MapLayer {
private:
Floorplan::Floor* floor;
public:
/** ctor with the underlying model */
MMFloorStairs(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR_STAIRS), floor(floor) {
// add all floors
for (Floorplan::Stair* stair : floor->stairs) {
if (dynamic_cast<Floorplan::StairFreeform*>(stair)) {
addElement( new MMFloorStair(this, floor, (Floorplan::StairFreeform*)stair) );
}
}
}
void create(Floorplan::StairFreeform* stair) {
// add to underlying model
floor->stairs.push_back(stair);
// add to myself as element
addElement(new MMFloorStair(this, floor, stair));
}
std::string getLayerName() const override {return "stairs";}
};
#endif // MMFLOORSTAIRS_H