added new tools for creating APs, Beacons, GTP, POI, Fingerprints fixed selection issue changed new-element creation added missing layer parameters
48 lines
1.1 KiB
C++
48 lines
1.1 KiB
C++
#ifndef TOOLNEWACCESSPOINT_H
|
|
#define TOOLNEWACCESSPOINT_H
|
|
|
|
#include "ToolNewElement.h"
|
|
#include "../../model/MMFloorAccessPoint.h"
|
|
#include "../../model/MMFloorAccessPoints.h"
|
|
|
|
class ToolNewAccessPoint : public ToolNewElement<Floorplan::AccessPoint, MMFloorAccessPoint> {
|
|
|
|
public:
|
|
|
|
ToolNewAccessPoint(Tools& tools, MapLayer* layer) : ToolNewElement(tools, layer) {
|
|
;
|
|
}
|
|
|
|
void becomesActive() override {
|
|
emit onHelpTextChange("left-click where to place a new access-point. right-click to end.");
|
|
}
|
|
|
|
void becomesInactive() override {
|
|
;
|
|
}
|
|
|
|
const std::string getName() const override {
|
|
return "new Access-Point";
|
|
}
|
|
|
|
void moving(const Point2 mapPoint) override {
|
|
(void) mapPoint;
|
|
}
|
|
|
|
/** next point */
|
|
void leftMouse(const Point2 mapPoint) override {
|
|
foEL = new Floorplan::AccessPoint("AP xx", "xx:xx:xx:xx:xx:xx", Point3(mapPoint.x, mapPoint.y, 2.0));
|
|
MMFloorAccessPoints* obs = (MMFloorAccessPoints*)layer;
|
|
mmEL = obs->createAP(foEL);
|
|
}
|
|
|
|
void rightMouse(const Point2 mapPoint) override {
|
|
(void) mapPoint;
|
|
finalizeCurrent();
|
|
disableMe();
|
|
}
|
|
|
|
};
|
|
|
|
#endif // TOOLNEWACCESSPOINT_H
|