37 #include <QDomElement> 38 #include <QStringList> 43 DoubleProperty::DoubleProperty()
56 retval->mName = name.isEmpty() ? uid : name;
58 retval->mRange = range;
60 retval->mValue = retval->mStore.
readValue(QString::number(value)).toDouble();
61 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.