added support for fingerprint adding/editing
some visualization changes
This commit is contained in:
51
mapview/model/MMFloorFingerprints.h
Normal file
51
mapview/model/MMFloorFingerprints.h
Normal file
@@ -0,0 +1,51 @@
|
||||
#ifndef MMFLOORFINGERPRINTS_H
|
||||
#define MMFLOORFINGERPRINTS_H
|
||||
|
||||
|
||||
#include "MapLayer.h"
|
||||
#include "MMFloorFingerprintLocation.h"
|
||||
|
||||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||||
|
||||
/**
|
||||
* layer that contains all of one floor's fingerprints:
|
||||
* locations, measurements?, other?
|
||||
*/
|
||||
class MMFloorFingerprints : public MapLayer {
|
||||
|
||||
Floorplan::Floor* floor;
|
||||
|
||||
public:
|
||||
|
||||
/** ctor with the floor */
|
||||
MMFloorFingerprints(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR_FINGERPRINTS), floor(floor) {
|
||||
|
||||
// the obstacles
|
||||
for (Floorplan::FingerprintLocation* fpl : floor->fpLocations) {
|
||||
addElement(new MMFloorFingerprintLocation(this, floor, fpl));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/** get the corresponding floor from the underlying model */
|
||||
Floorplan::Floor* getFloor() {return floor;}
|
||||
|
||||
//TODO: check
|
||||
MMFloorFingerprintLocation* create(Floorplan::FingerprintLocation* fpl) {
|
||||
|
||||
// add to underlying model
|
||||
floor->fpLocations.push_back(fpl);
|
||||
|
||||
// add to myself as element
|
||||
MMFloorFingerprintLocation* mm = new MMFloorFingerprintLocation(this, floor, fpl);
|
||||
addElement(mm);
|
||||
return mm;
|
||||
|
||||
}
|
||||
|
||||
std::string getLayerName() const override {return "fingerprints";}
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif // MMFLOORFINGERPRINTS_H
|
||||
Reference in New Issue
Block a user