added new tools for creating APs, Beacons, GTP, POI, Fingerprints fixed selection issue changed new-element creation added missing layer parameters
50 lines
975 B
C++
50 lines
975 B
C++
#ifndef TOOLNEWPOI_H
|
|
#define TOOLNEWPOI_H
|
|
|
|
|
|
#include "ToolNewElement.h"
|
|
#include "../../model/MMFloorPOI.h"
|
|
#include "../../model/MMFloorPOIs.h"
|
|
|
|
class ToolNewPOI : public ToolNewElement<Floorplan::POI, MMFloorPOI> {
|
|
|
|
public:
|
|
|
|
ToolNewPOI(Tools& tools, MapLayer* layer) : ToolNewElement(tools, layer) {
|
|
;
|
|
}
|
|
|
|
void becomesActive() override {
|
|
emit onHelpTextChange("left-click where to place a new POI. 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::POI(Floorplan::POIType::ROOM, "POI", mapPoint);
|
|
MMFloorPOIs* obs = (MMFloorPOIs*)layer;
|
|
mmEL = obs->createPOI(foEL);
|
|
}
|
|
|
|
void rightMouse(const Point2 mapPoint) override {
|
|
(void) mapPoint;
|
|
finalizeCurrent();
|
|
disableMe();
|
|
}
|
|
|
|
};
|
|
|
|
|
|
#endif // TOOLNEWPOI_H
|