3 // Part of the Architektonas Project
4 // Originally part of QCad Community Edition by Andrew Mustun
5 // Extensively rewritten and refactored by James L. Hammons
6 // Portions copyright (C) 2001-2003 RibbonSoft
7 // Copyright (C) 2010 Underground Software
8 // See the README and GPLv2 files for licensing and warranty information
10 // JLH = James L. Hammons <jlhamm@acm.org>
13 // --- ---------- -----------------------------------------------------------
14 // JLH 05/07/2010 Moved implementation from header to this file. :-)
17 // We probably could replace all this crap with QVariant...
22 type = RS2::VariableVoid;
26 Variable::Variable(const Vector & v, int c)
32 Variable::Variable(const QString & v, int c)
38 Variable::Variable(int v, int c)
44 Variable::Variable(double v, int c)
50 /*virtual*/ Variable::~Variable()
54 void Variable::setString(const QString & str)
57 type = RS2::VariableString;
60 void Variable::setInt(int i)
63 type = RS2::VariableInt;
66 void Variable::setDouble(double d)
69 type = RS2::VariableDouble;
72 void Variable::setVector(const Vector & v)
75 type = RS2::VariableVector;
78 QString Variable::getString()
83 int Variable::getInt()
88 double Variable::getDouble()
93 Vector Variable::getVector()
98 RS2::VariableType Variable::getType()
103 int Variable::getCode()