fixed some issues

added new tools for creating APs, Beacons, GTP, POI, Fingerprints
fixed selection issue
changed new-element creation
added missing layer parameters
This commit is contained in:
2017-06-01 16:26:09 +02:00
parent 489a64fd69
commit 7a23001b82
29 changed files with 763 additions and 265 deletions

View File

@@ -19,7 +19,7 @@ public:
}
void becomesActive() override {
create(); // start adding an new element
//create(); // start adding an new element
}
void becomesInactive() override {
@@ -30,7 +30,46 @@ public:
return "new Wall";
}
void createEmptyElement() override {
/** mouse is currently moved */
void moving(const Point2 mapPoint) override {
// live-moving of the ending point
if (idx == 1) { foEL->to = mapPoint; }
}
/** next point */
void leftMouse(const Point2 mapPoint) override {
// 1st click (where to start the line)
if (idx == 0) {
createEmptyElement();
foEL->from = mapPoint; foEL->to = mapPoint;
++idx;
// 2nd click (wehere the line ends)
} else if (idx == 1) {
finalizeCurrent();
idx = 0;
if (!addAnother) {disableMe();}
}
}
void rightMouse(const Point2 mapPoint) override {
(void) mapPoint;
finalizeCurrent();
disableMe();
}
private:
void createEmptyElement() {
foEL = new Floorplan::FloorObstacleLine(Floorplan::ObstacleType::WALL, Floorplan::Material::DRYWALL, Point2(0, 0), Point2(0, 0));
MMFloorObstacles* obs = (MMFloorObstacles*)layer;
@@ -38,33 +77,6 @@ public:
}
/** mouse is currently moved */
void moving(const Point2 mapPoint) override {
if (idx == 0) { foEL->from = mapPoint; foEL->to = mapPoint; }
if (idx == 1) { foEL->to = mapPoint; }
}
/** next point */
void leftMouse() override {
if (++idx == 2) {
finalizeCurrent();
if (addAnother) {
idx = 0;
create();
} else {
disableMe();
}
}
}
void rightMouse() override {
}
};