|
NorMIT-nav
2023.01.05-dev+develop.0da12
An IGT application
|
Go to the documentation of this file.
14 #include <QDomElement>
15 #include <QStringList>
22 SpaceProperty::SpaceProperty() : mIsReadOnly(false)
34 retval->mName = name.isEmpty() ? uid : name;
36 retval->mRange = range;
39 retval->mAllowOnlyValuesInRange =
true;
47 this->providerChangedSlot();
50 void SpaceProperty::providerChangedSlot()
52 std::map<QString, QString> names = mProvider->getDisplayNamesForCoordRefObjects();
55 std::vector<CoordinateSystem> spaces = mProvider->getSpacesToPresentInGUI();
124 if (mDisplayNames.count(
internal))
125 return mDisplayNames[
internal];
131 mDisplayNames = names;
void setSpaceProvider(SpaceProviderPtr provider)
virtual void setValueRange(std::vector< Space > range)
range of value. Use if data is constrained to a set.
virtual QString convertRefObjectInternal2Display(QString internal)
conversion from internal value to display value
void spaceAddedOrRemoved()
Namespace for all CustusX production code.
void changed()
emit when the underlying data value is changed: The user interface will be updated.
virtual void setHelp(QString val)
virtual bool setValue(const Space &value)
set the data value.
virtual void setRefObjectDisplayNames(std::map< QString, QString > names)
static SpacePropertyPtr initialize(const QString &uid, QString name, QString help, Space value=Space(), std::vector< Space > range=std::vector< Space >(), QDomNode root=QDomNode())
virtual Space getValue() const
get the data value.
virtual QString getDisplayName() const
name of data entity. Used for display to user.
Helper class for storing one string value in an xml document.
virtual QString getUid() const
void setReadOnly(bool val)
static CoordinateSystem fromString(QString text)
virtual std::vector< Space > getValueRange() const
boost::shared_ptr< class SpaceProperty > SpacePropertyPtr
void writeValue(const QString &val)
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
Identification of a Coordinate system.