added support for meta-data editing improved element selection changed zooming fixed some issues with layer events fixed issue with 3D outline fixed loading issue for old maps some interface changes
53 lines
1.1 KiB
C++
53 lines
1.1 KiB
C++
#ifndef MMFLOORUNDERLAY_H
|
|
#define MMFLOORUNDERLAY_H
|
|
|
|
#include "MMFloorUnderlayImage.h"
|
|
|
|
#include "../2D/MV2DElementFloorUnderlay.h"
|
|
|
|
#include <Indoor/floorplan/v2/Floorplan.h>
|
|
|
|
/**
|
|
* add an external file as underlay (to copy it onto the map)
|
|
*/
|
|
class MMFloorUnderlays : public MapLayer {
|
|
|
|
private:
|
|
|
|
Floorplan::Floor* floor;
|
|
|
|
public:
|
|
|
|
/** ctor */
|
|
MMFloorUnderlays(MapLayer* parent, Floorplan::Floor* floor) : MapLayer(parent, MapLayerType::FLOOR_UNDERLAYS), floor(floor) {
|
|
|
|
// the underlays
|
|
for (Floorplan::UnderlayImage* img : floor->underlays) {
|
|
addElement(new MMFloorUnderlayImage(this, floor, img));
|
|
}
|
|
|
|
}
|
|
|
|
//TODO: check
|
|
void createImage(const Point2 center) {
|
|
|
|
Floorplan::UnderlayImage* elem = new Floorplan::UnderlayImage();
|
|
|
|
// add to underlying model
|
|
floor->underlays.push_back(elem);
|
|
|
|
// add to myself as element
|
|
MMFloorUnderlayImage* img = new MMFloorUnderlayImage(this, floor, elem);
|
|
addElement(img);
|
|
img->setAnchor(center);
|
|
img->setScale(0.1, 0.1);
|
|
|
|
}
|
|
|
|
virtual std::string getLayerName() const override {return "underlay";}
|
|
|
|
};
|
|
|
|
|
|
#endif // MMFLOORUNDERLAY_H
|