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/2D/MV2DElementStair.h
2018-10-25 12:23:40 +02:00

63 lines
1.6 KiB
C++
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © 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 MV2DELEMENTSTAIR_H
#define MV2DELEMENTSTAIR_H
#include "MV2DElement.h"
#include "HasMoveableNodes.h"
#include <Indoor/floorplan/v2/Floorplan.h>
class MV2DElementStair : public MV2DElement, public HasMoveableNodes {
private:
bool sel = false;
Floorplan::IndoorMap* map;
Floorplan::Floor* floor;
Floorplan::Stair* stair;
public:
/** ctor with the stair to render/edit */
MV2DElementStair(Floorplan::IndoorMap* map, Floorplan::Floor* floor, Floorplan::Stair* stair);
/** 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;
int getSelPart() const;
int getSelNode() const;
/** repaint me */
void paint(Painter& p) override;
virtual bool keyPressEvent(MapView2D* v, QKeyEvent *e) override;
virtual void onFocus() override;
virtual void onUnfocus() override;
virtual std::vector<MoveableNode> getMoveableNodes() const override;
void onNodeMove(MapView2D* v, const int userIdx, const Point2 newPos) override;
void onNodeMoved(MapView2D* v, const int userIdx, const Point2 newPos) override;
void onNodeSelect(MapView2D* v, const int userIdx) override;
};
#endif // MV2DELEMENTSTAIR_H