12 #ifndef CXSTRINGPROPERTY_H_ 13 #define CXSTRINGPROPERTY_H_ 15 #include "cxResourceExport.h" 17 #include <QDomElement> 18 #include <QStringList> 45 static StringPropertyPtr initialize(
const QString& uid, QString name, QString help, QString value, QStringList range, QDomNode root = QDomNode());
46 static StringPropertyPtr initialize(
const QString& uid, QString name, QString help, QString value, QDomNode root = QDomNode());
50 virtual QString getDisplayName()
const;
51 virtual QString getUid()
const;
52 virtual bool setValue(
const QString& value);
53 virtual QString getValue()
const;
54 virtual QString getHelp()
const;
55 virtual void setHelp(QString val);
56 virtual QStringList getValueRange()
const;
57 virtual void setValueRange(QStringList range);
58 virtual QString convertInternal2Display(QString
internal);
59 virtual void setDisplayNames(std::map<QString, QString> names);
60 virtual std::map<QString, QString>
getDisplayNames()
const {
return mDisplayNames; }
64 void setReadOnly(
bool val);
65 virtual void setDisplayName(QString val);
79 std::map<QString, QString> mDisplayNames;
81 bool mAllowOnlyValuesInRange;
virtual bool getAllowOnlyValuesInRange() const
Abstract interface for interaction with internal string-valued data.
Helper class for storing one string value in an xml document.
boost::shared_ptr< class StringProperty > StringPropertyPtr
virtual bool isReadOnly() const
Represents one option of the string type. The data are stored within a xml document.
virtual std::map< QString, QString > getDisplayNames() const
Namespace for all CustusX production code.