35 #include <QDomElement> 36 #include <QStringList> 43 SpaceProperty::SpaceProperty() : mIsReadOnly(false)
55 retval->mName = name.isEmpty() ? uid : name;
57 retval->mRange = range;
60 retval->mAllowOnlyValuesInRange =
true;
68 this->providerChangedSlot();
71 void SpaceProperty::providerChangedSlot()
73 std::map<QString, QString> names = mProvider->getDisplayNamesForCoordRefObjects();
74 this->setRefObjectDisplayNames(names);
76 std::vector<CoordinateSystem> spaces = mProvider->getSpacesToPresentInGUI();
77 this->setValueRange(spaces);
145 if (mDisplayNames.count(
internal))
146 return mDisplayNames[
internal];
152 mDisplayNames = names;
boost::shared_ptr< class SpaceProvider > SpaceProviderPtr
void setSpaceProvider(SpaceProviderPtr provider)
static SpacePropertyPtr initialize(const QString &uid, QString name, QString help, Space value=Space(), std::vector< Space > range=std::vector< Space >(), QDomNode root=QDomNode())
void spaceAddedOrRemoved()
boost::shared_ptr< class SpaceProperty > SpacePropertyPtr
virtual void setHelp(QString val)
virtual QString getHelp() const
return a descriptive help string for the data, used for example as a tool tip.
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 convertRefObjectInternal2Display(QString internal)
conversion from internal value to display value
Identification of a Coordinate system.
virtual Space getValue() const
get the data value.
void changed()
emit when the underlying data value is changed: The user interface will be updated.
void setReadOnly(bool val)
virtual std::vector< Space > getValueRange() const
virtual QString getUid() const
virtual void setRefObjectDisplayNames(std::map< QString, QString > names)
virtual void setValueRange(std::vector< Space > range)
range of value. Use if data is constrained to a set.
static CoordinateSystem fromString(QString text)
virtual bool setValue(const Space &value)
set the data value.
Namespace for all CustusX production code.