16 #include <QDomElement> 17 #include <QStringList> 22 DoubleProperty::DoubleProperty()
35 retval->mName = name.isEmpty() ? uid : name;
37 retval->mRange = range;
39 retval->mValue = retval->mStore.
readValue(QString::number(value)).toDouble();
40 retval->mDecimals = decimals;
virtual DoubleRange getValueRange() const
Utility class for describing a bounded numeric range.
Helper class for storing one string value in an xml document.
virtual void setValueRange(DoubleRange range)
range of value. Use if data is constrained to a set.
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
void changed()
emit when the underlying data value is changed: The user interface will be updated.
void writeValue(const QString &val)
boost::shared_ptr< class DoubleProperty > DoublePropertyPtr
virtual double getValue() const
get the data value.
virtual bool setValue(double value)
set the data value.
static DoublePropertyPtr initialize(const QString &uid, QString name, QString help, double value, DoubleRange range, int decimals, QDomNode root=QDomNode())
void setInternal2Display(double factor)
virtual QString getUid() const
virtual int getValueDecimals() const
number of relevant decimals in value
QString readValue(const QString &defval) const
virtual QString getDisplayName() const
name of data entity. Used for display to user.
Namespace for all CustusX production code.