initial commit

This commit is contained in:
kazu
2016-05-24 16:55:19 +02:00
commit 13a89df8d6
77 changed files with 7454 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
#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) {
new MMFloorBeacon(this, floor, b);
}
}
std::string getLayerName() const override {return "Beacons";}
//TODO: check
void createBeacon(Floorplan::Beacon* b) {
// add to underlying model
floor->beacons.push_back(b);
// add to myself as element
elements.push_back(new MMFloorBeacon(this, floor, b));
}
};
#endif // MMFLOORBEACONS_H