3 // Originally part of QCad Community Edition by Andrew Mustun
4 // Extensively rewritten and refactored by James L. Hammons
5 // (C) 2010 Underground Software
7 // JLH = James L. Hammons <jlhamm@acm.org>
10 // --- ---------- -----------------------------------------------------------
11 // JLH 05/07/2010 Moved implementation from header to this file. :-)
14 // We probably could replace all this crap with QVariant...
15 #include "rs_variable.h"
17 RS_Variable::RS_Variable()
19 type = RS2::VariableVoid;
23 RS_Variable::RS_Variable(const Vector & v, int c)
29 RS_Variable::RS_Variable(const QString & v, int c)
35 RS_Variable::RS_Variable(int v, int c)
41 RS_Variable::RS_Variable(double v, int c)
47 /*virtual*/ RS_Variable::~RS_Variable()
51 void RS_Variable::setString(const QString & str)
54 type = RS2::VariableString;
57 void RS_Variable::setInt(int i)
60 type = RS2::VariableInt;
63 void RS_Variable::setDouble(double d)
66 type = RS2::VariableDouble;
69 void RS_Variable::setVector(const Vector & v)
72 type = RS2::VariableVector;
75 QString RS_Variable::getString()
80 int RS_Variable::getInt()
85 double RS_Variable::getDouble()
90 Vector RS_Variable::getVector()
95 RS2::VariableType RS_Variable::getType()
100 int RS_Variable::getCode()