|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
15 #include <QDomElement>
16 #include <QStringList>
22 StringProperty::StringProperty() :
32 retval->mRange = range;
33 retval->mAllowOnlyValuesInRange =
true;
41 retval->mName = name.isEmpty() ? uid : name;
44 retval->mValue = retval->mStore.readValue(value);
45 retval->mAllowOnlyValuesInRange =
false;
120 if (mDisplayNames.count(
internal))
121 return mDisplayNames[
internal];
127 mDisplayNames = names;
virtual QString convertInternal2Display(QString internal)
conversion from internal value to display value
void setReadOnly(bool val)
Namespace for all CustusX production code.
virtual QStringList getValueRange() const
void changed()
emit when the underlying data value is changed: The user interface will be updated.
boost::shared_ptr< class StringProperty > StringPropertyPtr
virtual QString getValue() const
get the data value.
Represents one option of the string type. The data are stored within a xml document.
virtual void setDisplayName(QString val)
Helper class for storing one string value in an xml document.
virtual void setDisplayNames(std::map< QString, QString > names)
virtual void setHelp(QString val)
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
static StringPropertyPtr initialize(const QString &uid, QString name, QString help, QString value, QStringList range, QDomNode root=QDomNode())
virtual QString getDisplayName() const
name of data entity. Used for display to user.
virtual void setValueRange(QStringList range)
range of value. Use if data is constrained to a set.
void writeValue(const QString &val)
virtual bool setValue(const QString &value)
set the data value.
virtual QString getUid() const