52 lines
1.3 KiB
C++
52 lines
1.3 KiB
C++
#ifndef MV2DELEMENTFLOOROBSTACLEDOOR_H
|
|
#define MV2DELEMENTFLOOROBSTACLEDOOR_H
|
|
|
|
#include "MV2DElement.h"
|
|
#include "HasMoveableNodes.h"
|
|
#include <Indoor/floorplan/v2/Floorplan.h>
|
|
|
|
class MV2DElementFloorObstacleDoor : public MV2DElement, public HasMoveableNodes {
|
|
|
|
private:
|
|
|
|
//int selPoint = -1;
|
|
Floorplan::FloorObstacleDoor* fo;
|
|
|
|
public:
|
|
|
|
/** ctor */
|
|
MV2DElementFloorObstacleDoor(Floorplan::FloorObstacleDoor* fo);
|
|
|
|
/** get the element's 3D bounding box */
|
|
BBox2 getBoundingBox() const override;
|
|
|
|
/** get the element's minimal distance (nearest whatsoever) to the given point */
|
|
ClickDist getMinDistanceXY(const Point2 p) const override;
|
|
|
|
|
|
|
|
/** repaint me */
|
|
void paint(Painter& p) override;
|
|
|
|
virtual void onFocus() override;
|
|
|
|
virtual void onUnfocus() override;
|
|
|
|
virtual void mousePressed(MapView2D* v, const Point2 p) override;
|
|
|
|
virtual void mouseMove(MapView2D* v, const Point2 p) override;
|
|
|
|
virtual void mouseReleased(MapView2D* v, const Point2 p) override;
|
|
|
|
/** get a list of all nodes that are selectable / moveable */
|
|
virtual std::vector<MoveableNode> getMoveableNodes() const override;
|
|
|
|
/** the given node was moved */
|
|
virtual void onNodeMove(MapView2D* v, const int userIdx, const Point2 newPos) override;
|
|
|
|
virtual bool keyPressEvent(MapView2D* v, QKeyEvent *e) override;
|
|
|
|
};
|
|
|
|
#endif // MV2DELEMENTFLOOROBSTACLEDOOR_H
|