added new tools for creating APs, Beacons, GTP, POI, Fingerprints fixed selection issue changed new-element creation added missing layer parameters
50 lines
1.1 KiB
C++
50 lines
1.1 KiB
C++
#ifndef TOOLNEWGROUNDTRUTH_H
|
|
#define TOOLNEWGROUNDTRUTH_H
|
|
|
|
|
|
#include "ToolNewElement.h"
|
|
#include "../../model/MMFloorGroundTruthPoint.h"
|
|
#include "../../model/MMFloorGroundTruthPoints.h"
|
|
|
|
class ToolNewGroundTruth : public ToolNewElement<Floorplan::GroundTruthPoint, MMFloorGroundTruthPoint> {
|
|
|
|
public:
|
|
|
|
ToolNewGroundTruth(Tools& tools, MapLayer* layer) : ToolNewElement(tools, layer) {
|
|
;
|
|
}
|
|
|
|
void becomesActive() override {
|
|
emit onHelpTextChange("left-click where to place a new ground-truth-point. right-click to end.");
|
|
}
|
|
|
|
void becomesInactive() override {
|
|
;
|
|
}
|
|
|
|
const std::string getName() const override {
|
|
return "new GroundTruth";
|
|
}
|
|
|
|
void moving(const Point2 mapPoint) override {
|
|
(void) mapPoint;
|
|
}
|
|
|
|
/** next point */
|
|
void leftMouse(const Point2 mapPoint) override {
|
|
foEL = new Floorplan::GroundTruthPoint(0, Point3(mapPoint.x, mapPoint.y, 0));
|
|
MMFloorGroundTruthPoints* obs = (MMFloorGroundTruthPoints*)layer;
|
|
mmEL = obs->createGroundTruthPoint(foEL);
|
|
}
|
|
|
|
void rightMouse(const Point2 mapPoint) override {
|
|
(void) mapPoint;
|
|
finalizeCurrent();
|
|
disableMe();
|
|
}
|
|
|
|
};
|
|
|
|
|
|
#endif // TOOLNEWGROUNDTRUTH_H
|