This repository has been archived on 2020-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
Files
IndoorMap/mapview/model/MMFloorFingerprints.h
2018-10-25 12:19:36 +02:00

71 lines
1.7 KiB
C++
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/*
* © Copyright 2014 Urheberrechtshinweis
* Alle Rechte vorbehalten / All Rights Reserved
*
* Programmcode ist urheberrechtlich geschuetzt.
* Das Urheberrecht liegt, soweit nicht ausdruecklich anders gekennzeichnet, bei Frank Ebner.
* Keine Verwendung ohne explizite Genehmigung.
* (vgl. § 106 ff UrhG / § 97 UrhG)
*/
#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));
}
}
bool isVisible() const override {
return floor->fpLocations.enabled;
}
void setVisible(const bool visible) override {
this-> floor->fpLocations.enabled = visible;
onVisibilityChanged(visible);
}
/** 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