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

58 lines
1.3 KiB
C++
Raw 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 TOOLNEWBEACON_H
#define TOOLNEWBEACON_H
#include "ToolNewElement.h"
#include "../../model/MMFloorBeacon.h"
#include "../../model/MMFloorBeacons.h"
class ToolNewBeacon : public ToolNewElement<Floorplan::Beacon, MMFloorBeacon> {
public:
ToolNewBeacon(Tools& tools, MapLayer* layer) : ToolNewElement(tools, layer) {
;
}
void becomesActive() override {
emit onHelpTextChange("left-click where to place a new beacon. right-click to end.");
}
void becomesInactive() override {
;
}
const std::string getName() const override {
return "new Beacon";
}
void moving(const Point2 mapPoint) override {
(void) mapPoint;
}
/** next point */
void leftMouse(const Point2 mapPoint) override {
foEL = new Floorplan::Beacon("Beacon xx", "xx:xx:xx:xx:xx:xx", Point3(mapPoint.x, mapPoint.y, 2));
MMFloorBeacons* obs = (MMFloorBeacons*)layer;
mmEL = obs->createBeacon(foEL);
}
void rightMouse(const Point2 mapPoint) override {
(void) mapPoint;
finalizeCurrent();
disableMe();
}
};
#endif // TOOLNEWBEACON_H