added new tools for creating APs, Beacons, GTP, POI, Fingerprints fixed selection issue changed new-element creation added missing layer parameters
51 lines
1012 B
C++
51 lines
1012 B
C++
#ifndef MMFLOORBEACONS_H
|
|
#define MMFLOORBEACONS_H
|
|
|
|
#include "MapLayer.h"
|
|
#include "MMFloorBeacon.h"
|
|
|
|
#include <Indoor/floorplan/v2/Floorplan.h>
|
|
|
|
/**
|
|
* layer containing all of the floor's beaconss
|
|
*/
|
|
class MMFloorBeacons : public MapLayer {
|
|
|
|
private:
|
|
|
|
Floorplan::Floor* floor;
|
|
|
|
public:
|
|
|
|
/** ctor with the underlying model */
|
|
MMFloorBeacons(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR_BEACONS), floor(floor) {
|
|
|
|
// add all Beacons
|
|
for (Floorplan::Beacon* b : floor->beacons) {
|
|
addElement(new MMFloorBeacon(this, floor, b));
|
|
}
|
|
|
|
}
|
|
|
|
std::string getLayerName() const override {return "Beacons";}
|
|
|
|
//TODO: check
|
|
MMFloorBeacon* createBeacon(Floorplan::Beacon* b) {
|
|
|
|
// add to underlying model
|
|
floor->beacons.push_back(b);
|
|
|
|
// // add to myself as element
|
|
// addElement(new MMFloorBeacon(this, floor, b));
|
|
|
|
// add to myself as element
|
|
MMFloorBeacon* mm = new MMFloorBeacon(this, floor, b);
|
|
addElement(mm);
|
|
return mm;
|
|
|
|
}
|
|
|
|
};
|
|
|
|
#endif // MMFLOORBEACONS_H
|