added option for underlay opacity change
adjusted interface [removed invalid const]
This commit is contained in:
@@ -104,7 +104,7 @@ public:
|
||||
virtual ParamValue getParamValue(const int idx) const = 0;
|
||||
|
||||
/** set the idx-th param's value */
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const = 0;
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: floor->name = val.toString(); break;
|
||||
case 1: floor->height = val.toFloat(); break;
|
||||
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: ap->name = val.toString(); break;
|
||||
case 1: ap->mac = val.toString(); break;
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: b->name = val.toString(); break;
|
||||
case 1: b->pos = val.toPoint3(); break;
|
||||
|
||||
@@ -47,7 +47,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: elevator->width = val.toFloat(); break;
|
||||
case 1: elevator->depth = val.toFloat(); break;
|
||||
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: fpl->name = val.toString(); break;
|
||||
case 1: fpl->posOnFloor = val.toPoint2(); break;
|
||||
|
||||
@@ -42,7 +42,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: gtp->id = val.toInt(); break;
|
||||
case 1: gtp->pos = val.toPoint3(); break;
|
||||
|
||||
@@ -70,7 +70,7 @@ public:
|
||||
}
|
||||
|
||||
/** set the idx-th param's value */
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch (idx) {
|
||||
case 0: break;
|
||||
case 1: fo->height = val.toFloat(); break;
|
||||
|
||||
@@ -63,7 +63,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: break;
|
||||
}
|
||||
|
||||
@@ -57,7 +57,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
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;
|
||||
|
||||
@@ -44,7 +44,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch(idx) {
|
||||
case 0: poi->name = val.toString(); break;
|
||||
case 1: poi->type = (Floorplan::POIType) val.toInt(); break;
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
throw 1;
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
const int selPart = mv2d.getSelPart();
|
||||
const int selNode = mv2d.getSelNode();
|
||||
switch(idx) {
|
||||
|
||||
@@ -39,7 +39,9 @@ public:
|
||||
;
|
||||
}
|
||||
|
||||
int getNumParams() const override {return 4;}
|
||||
int getNumParams() const override {
|
||||
return 5;
|
||||
}
|
||||
|
||||
virtual Param getParamDesc(const int idx) const override {
|
||||
switch (idx) {
|
||||
@@ -47,6 +49,7 @@ public:
|
||||
case 1: return Param("scale X", ParamType::FLOAT);
|
||||
case 2: return Param("scale Y", ParamType::FLOAT);
|
||||
case 3: return Param("Anchor", ParamType::POINT2);
|
||||
case 4: return Param("opacity", ParamType::FLOAT);
|
||||
default: throw 1;
|
||||
}
|
||||
}
|
||||
@@ -57,16 +60,18 @@ public:
|
||||
case 1: return ParamValue(img->scaleX);
|
||||
case 2: return ParamValue(img->scaleY);
|
||||
case 3: return ParamValue(img->anchor);
|
||||
case 4: return ParamValue(mv2d.getOpacity());
|
||||
default: throw 1;
|
||||
}
|
||||
}
|
||||
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) const override {
|
||||
virtual void setParamValue(const int idx, const ParamValue& val) override {
|
||||
switch (idx) {
|
||||
case 0: img->filename = val.toString(); break;
|
||||
case 1: img->scaleX = val.toFloat(); break;
|
||||
case 2: img->scaleY = val.toFloat(); break;
|
||||
case 3: img->anchor = val.toPoint2(); break;
|
||||
case 4: mv2d.setOpacity(val.toFloat()); break;
|
||||
default: throw 1;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user