55 lines
1.5 KiB
C++
55 lines
1.5 KiB
C++
/*
|
||
* © Copyright 2014 – Urheberrechtshinweis
|
||
* Alle Rechte vorbehalten / All Rights Reserved
|
||
*
|
||
* Programmcode ist urheberrechtlich geschuetzt.
|
||
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
|
||
* Keine Verwendung ohne explizite Genehmigung.
|
||
* (vgl. § 106 ff UrhG / § 97 UrhG)
|
||
*/
|
||
|
||
#ifndef MV2DELEMENTFLOOROUTLINEPOLYGON_H
|
||
#define MV2DELEMENTFLOOROUTLINEPOLYGON_H
|
||
|
||
#include "MV2DElement.h"
|
||
#include "HasMoveableNodes.h"
|
||
|
||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||
|
||
class MV2DElementFloorOutlinePolygon : public MV2DElement, public HasMoveableNodes {
|
||
|
||
private:
|
||
|
||
Floorplan::FloorOutlinePolygon& fo;
|
||
|
||
public:
|
||
|
||
/** ctor */
|
||
MV2DElementFloorOutlinePolygon(Floorplan::FloorOutlinePolygon& 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;
|
||
|
||
virtual void onFocus() override;
|
||
|
||
virtual void onUnfocus() override;
|
||
|
||
void paint(Painter& p) override;
|
||
|
||
/** get a list of all nodes that are selectable / moveable */
|
||
virtual std::vector<MoveableNode> getMoveableNodes() const override;
|
||
|
||
/** the given node was moved */
|
||
void onNodeMove(MapView2D* v, const int userIdx, const Point2 newPos) override;
|
||
|
||
void onNodeMoved(MapView2D* v, const int userIdx, const Point2 newPos) override;
|
||
|
||
virtual bool keyPressEvent(MapView2D* v, QKeyEvent *e) override;
|
||
|
||
};
|
||
|
||
#endif // MV2DELEMENTFLOOROUTLINEPOLYGON_H
|