64 lines
1.7 KiB
C++
64 lines
1.7 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 MV2DELEMENTFLOOROBSTACLEOBJECT_H
|
||
#define MV2DELEMENTFLOOROBSTACLEOBJECT_H
|
||
|
||
#include "MV2DElement.h"
|
||
#include "HasMoveableNodes.h"
|
||
|
||
//#include "MapViewElementHelper.h"
|
||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||
//#include <stdio.h>
|
||
|
||
//#include "../../UIHelper.h"
|
||
|
||
class MV2DElementFloorObstacleObject : public MV2DElement, public HasMoveableNodes {
|
||
|
||
private:
|
||
|
||
//bool sel = false;
|
||
Floorplan::FloorObstacleObject* fo;
|
||
|
||
public:
|
||
|
||
/** ctor with the AP to render/edit */
|
||
MV2DElementFloorObstacleObject(Floorplan::FloorObstacleObject* fo);
|
||
|
||
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 std::vector<MoveableNode> getMoveableNodes() const override;
|
||
|
||
virtual void onNodeMove(MapView2D* v, const int userIdx, const Point2 newPos) override;
|
||
|
||
virtual void onNodeMoved(MapView2D* v, const int userIdx, const Point2 newPos) 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;
|
||
|
||
virtual bool keyPressEvent(MapView2D* v, QKeyEvent *e) override;
|
||
|
||
virtual void onFocus() override;
|
||
|
||
virtual void onUnfocus() override;
|
||
|
||
};
|
||
|
||
#endif // MV2DELEMENTFLOOROBSTACLELINE_H
|