added new tools for creating APs, Beacons, GTP, POI, Fingerprints fixed selection issue changed new-element creation added missing layer parameters
48 lines
1.0 KiB
C++
48 lines
1.0 KiB
C++
#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
|