|
NorMIT-nav
22.09
An IGT application
|
Go to the documentation of this file.
15 #include <QDomElement>
16 #include <QStringList>
22 StringListProperty::StringListProperty()
29 retval->mName = name.isEmpty() ? uid : name;
32 retval->mValue = retval->mStore.readVariant(value).value<QStringList>();
33 retval->mRange = range;
74 this->
setValue(val.value<QStringList>());
89 for (
int i=0; i<val.size(); ++i)
90 if (mRange.contains(val[i]))
91 mValue.push_back(val[i]);
114 if (mDisplayNames.count(
internal))
115 return mDisplayNames[
internal];
121 mDisplayNames = names;
void writeVariant(const QVariant &val)
Namespace for all CustusX production code.
virtual QStringList getValueRange() const
virtual void setValueRange(QStringList range)
range that values can be selected from
void changed()
emit when the underlying data value is changed: The user interface will be updated.
Represents one collection of strings.
virtual QStringList getValue() const
get the data value.
virtual QString convertInternal2Display(QString internal)
conversion from internal value to display value
static StringListPropertyPtr initialize(const QString &uid, QString name, QString help, QStringList value, QStringList range, QDomNode root=QDomNode())
virtual void setDisplayNames(std::map< QString, QString > names)
virtual QVariant getValueAsVariant() const
virtual QString getDisplayName() const
name of data entity. Used for display to user.
virtual void setValueFromVariant(QVariant val)
Helper class for storing one string value in an xml document.
virtual QString getUid() const
boost::shared_ptr< class StringListProperty > StringListPropertyPtr
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
virtual void setHelp(QString val)
virtual bool setValue(const QStringList &value)
set the data value.
virtual void setDisplayName(QString val)