refactoring/cleanups
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||||
|
||||
#include "EElementParams.h"
|
||||
|
||||
/**
|
||||
* describes one polygon within a floor's outline
|
||||
@@ -31,36 +32,39 @@ public:
|
||||
|
||||
Floorplan::FloorOutlinePolygon* getPolygon() {return fo;}
|
||||
|
||||
Floorplan::OutlineMethod getMethod() const {return fo->method;}
|
||||
void setMethod(const Floorplan::OutlineMethod m) {this->fo->method = m;}
|
||||
// Floorplan::OutlineMethod getMethod() const {return fo->method;}
|
||||
// void setMethod(const Floorplan::OutlineMethod m) {this->fo->method = m;}
|
||||
|
||||
MV2DElement* getMV2D() const override {return (MV2DElement*) &mv2d;}
|
||||
//MV3DElement* getMV3D() const override {return (MV3DElement*) &mv3d;}
|
||||
|
||||
virtual int getNumParams() const override {
|
||||
return 2;
|
||||
return 3;
|
||||
}
|
||||
|
||||
virtual Param getParamDesc(const int idx) const override {
|
||||
switch(idx) {
|
||||
case 0: return Param("name", ParamType::STRING);
|
||||
case 1: return Param("outdoor", ParamType::BOOL);
|
||||
case 0: return Param("name", ParamType::STRING);
|
||||
case 1: return Param("method", ParamType::ENUM, getOutlineMethodStrings());
|
||||
case 2: return Param("outdoor", ParamType::BOOL);
|
||||
}
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual ParamValue getParamValue(const int idx) const override {
|
||||
switch(idx) {
|
||||
case 0: return fo->name;
|
||||
case 1: return fo->outdoor;
|
||||
case 0: return fo->name;
|
||||
case 1: return (int) fo->method;
|
||||
case 2: return fo->outdoor;
|
||||
}
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: fo->name = val.toString(); break;
|
||||
case 1: fo->outdoor = val.toBool(); break;
|
||||
case 0: fo->name = val.toString(); break;
|
||||
case 1: fo->method = (Floorplan::OutlineMethod) val.toInt(); break;
|
||||
case 2: fo->outdoor = val.toBool(); break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user