many changes :P
This commit is contained in:
@@ -2,13 +2,16 @@
|
||||
#define IHASPARAMS_H
|
||||
|
||||
#include <Indoor/floorplan/v2/Floorplan.h>
|
||||
#include <QVariant>
|
||||
#include <Indoor/geo/Point2.h>
|
||||
#include <Indoor/geo/Point3.h>
|
||||
|
||||
enum class ParamType {
|
||||
INT,
|
||||
FLOAT,
|
||||
STRING,
|
||||
FILE,
|
||||
POINT2,
|
||||
POINT3,
|
||||
};
|
||||
|
||||
class ParamValue {
|
||||
@@ -17,6 +20,7 @@ private:
|
||||
union {
|
||||
int _int;
|
||||
float _float;
|
||||
float _arr[3];
|
||||
};
|
||||
std::string _str;
|
||||
|
||||
@@ -29,7 +33,11 @@ public:
|
||||
void setValue(const std::string& val) {_str = val;}
|
||||
void setValue(float val) {_float = val;}
|
||||
void setValue(int val) {_int = val;}
|
||||
void setValue(Point2 p) {_arr[0] = p.x; _arr[1] = p.y;}
|
||||
void setValue(Point3 p) {_arr[0] = p.x; _arr[1] = p.y; _arr[2] = p.z;}
|
||||
|
||||
Point2 toPoint2() const {return Point2(_arr[0], _arr[1]);}
|
||||
Point3 toPoint3() const {return Point3(_arr[0], _arr[1], _arr[2]);}
|
||||
std::string toString() const {return _str;}
|
||||
float toFloat() const {return _float;}
|
||||
int toInt() const {return _int;}
|
||||
|
||||
Reference in New Issue
Block a user