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/MMFloorObstacleCircle.h
kazu fa06320219 a whole lotta work!!
- refactoring
- completely changed the tooling (adding elements)
- better re-use for more stable editing
- new elements
- ui adjustments
- LINT for stair-editing
- many more changes
2016-08-29 19:05:46 +02:00

47 lines
1.2 KiB
C++

#ifndef MAPMODELELEMENTFLOOROBSTACLECIRCLE_H
#define MAPMODELELEMENTFLOOROBSTACLECIRCLE_H
#include "MapModelElement.h"
#include "../2D/MapViewElementHelper.h"
#include "IHasMaterial.h"
#include "IHasObstacleType.h"
#include "../2D/MV2DElementFloorObstacleCircle.h"
#include <Indoor/floorplan/v2/Floorplan.h>
class MMFloorObstacleCircle : public MapModelElement, public IHasMaterial {
private:
Floorplan::Floor* mf;
Floorplan::FloorObstacleCircle* c;
MV2DElementFloorObstacleCircle mv2d;
public:
MMFloorObstacleCircle(MapLayer* parent, Floorplan::Floor* mf, Floorplan::FloorObstacleCircle* c) :
MapModelElement(parent), mf(mf), c(c), mv2d(c) {
}
void setMaterial(const Floorplan::Material m) override {c->material = m;}
Floorplan::Material getMaterial() const override {return c->material;}
// void setObstacleType(const Floorplan::ObstacleType t) override {c->type = t;}
// Floorplan::ObstacleType getObatcleType() const override {return c->type;}
MV2DElement* getMV2D() const override {return (MV2DElement*) &mv2d;}
void deleteMe() const override {
parent->removeElement(this);
mf->obstacles.erase(std::remove(mf->obstacles.begin(), mf->obstacles.end(), c), mf->obstacles.end());
}
};
#endif // MAPMODELELEMENTFLOOROBSTACLECIRCLE_H