CustusX
16.5.0-rc9
An IGT application
|
Abstract interface for interaction with internal string-valued data. More...
#include <cxStringPropertyBase.h>
Public Types | |
enum | GuiRepresentation { grSTRING, grFILENAME } |
Public Member Functions | |
StringPropertyBase () | |
virtual | ~StringPropertyBase () |
virtual QString | getDisplayName () const =0 |
name of data entity. Used for display to user. More... | |
virtual QVariant | getValueAsVariant () const |
virtual void | setValueFromVariant (QVariant val) |
virtual QString | getUid () const |
virtual bool | setValue (const QString &value)=0 |
set the data value. More... | |
virtual QString | getValue () const =0 |
get the data value. More... | |
virtual bool | isReadOnly () const |
virtual bool | getAllowOnlyValuesInRange () const |
virtual QString | getHelp () const |
return a descriptive help string for the data, used for example as a tool tip. More... | |
virtual QStringList | getValueRange () const |
virtual QString | convertInternal2Display (QString internal) |
range of value. Use if data is constrained to a set. More... | |
virtual void | setGuiRepresentation (GuiRepresentation type) |
virtual GuiRepresentation | getGuiRepresentation () |
Public Member Functions inherited from cx::Property | |
Property () | |
virtual | ~Property () |
virtual bool | getEnabled () const |
Get the enabled/disabled state of the Property. More... | |
virtual bool | getAdvanced () const |
Get the advanced flag of the adapter. More... | |
virtual QString | getGroup () const |
Flag the adapter as part of a group. More... | |
Protected Attributes | |
GuiRepresentation | mGuiRepresentation |
Protected Attributes inherited from cx::Property | |
bool | mEnabled |
bool | mAdvanced |
QString | mGroup |
Additional Inherited Members | |
Public Slots inherited from cx::Property | |
virtual bool | setEnabled (bool enabled) |
Set the enabled/disabled state of the Property. More... | |
virtual bool | setAdvanced (bool advanced) |
Set the advanced flag of the adapter. More... | |
virtual bool | setGroup (QString name) |
Flag the adapter as part of a group. More... | |
Signals inherited from cx::Property | |
void | changed () |
emit when the underlying data value is changed: The user interface will be updated. More... | |
Static Public Member Functions inherited from cx::Property | |
static PropertyPtr | findProperty (std::vector< PropertyPtr > properties, QString id) |
Abstract interface for interaction with internal string-valued data.
The class provides a bridge between general user interface code and specific data structures. An implementation connects to a single data value.
Minimal implementation:
virtual QString getDisplayName() const; virtual bool setValue(QString value); virtual QString getValue() const; void changed();
By implementing these methods you can set and get values, and the data has a name. The changed() signal is used to make sure the user interface is updated even when data is changed by some other source.
For more control use the methods:
virtual QStringList getValueRange() const;
If there is a difference between the internal data representation and how you want to present them, use:
virtual QString convertInternal2Display(QString internal);
When testing, or during development, you can use the StringPropertyNull as a dummy implementation.
Definition at line 86 of file cxStringPropertyBase.h.
Enumerator | |
---|---|
grSTRING | |
grFILENAME |
Definition at line 94 of file cxStringPropertyBase.h.
|
inline |
Definition at line 90 of file cxStringPropertyBase.h.
|
inlinevirtual |
Definition at line 91 of file cxStringPropertyBase.h.
|
inlinevirtual |
range of value. Use if data is constrained to a set.
conversion from internal value to display value
Reimplemented in cx::StringPropertyParentFrame, cx::StringPropertyActiveProbeConfiguration, cx::StringProperty, cx::StringPropertySelectTool, cx::StringPropertyFusedInputOutputSelectData, cx::StringPropertyActiveTool, cx::SelectDataStringPropertyBase, cx::StringPropertySelectRecordSessionBase, and cx::StringPropertySelectCoordinateSystemBase.
Definition at line 134 of file cxStringPropertyBase.h.
|
inlinevirtual |
Reimplemented in cx::StringPropertyDataUidEditable, cx::StringPropertyDataNameEditable, and cx::StringProperty.
Definition at line 124 of file cxStringPropertyBase.h.
|
pure virtual |
name of data entity. Used for display to user.
Implements cx::Property.
Implemented in cx::StringPropertyGlyphLUT, cx::StringPropertyGlyphColorArray, cx::StringPropertyGlyphOrientationArray, cx::StringPropertyImageType, cx::StringPropertyDataModality, cx::StringPropertyDataUidEditable, cx::StringPropertyDataNameEditable, cx::StringPropertyParentFrame, cx::StringPropertyActiveProbeConfiguration, cx::StringPropertySelectRecordSession, cx::StringPropertySelectCoordinateSystem, cx::StringPropertySelectTool, cx::StringProperty, cx::StringPropertyFusedInputOutputSelectData, cx::StringPropertyActiveTool, cx::StringPropertyClipPlane, cx::SelectDataStringPropertyBase, and cx::StringPropertyActiveVideoSource.
|
inlinevirtual |
Definition at line 140 of file cxStringPropertyBase.h.
|
inlinevirtual |
return a descriptive help string for the data, used for example as a tool tip.
Reimplemented in cx::StringPropertyGlyphLUT, cx::StringPropertyGlyphColorArray, cx::StringPropertyGlyphOrientationArray, cx::StringPropertyImageType, cx::StringPropertyDataModality, cx::StringPropertyParentFrame, cx::StringPropertyActiveProbeConfiguration, cx::StringPropertySelectRecordSession, cx::StringPropertySelectCoordinateSystem, cx::StringPropertySelectTool, cx::StringProperty, cx::StringPropertyFusedInputOutputSelectData, cx::StringPropertyActiveTool, cx::StringPropertyClipPlane, cx::SelectDataStringPropertyBase, and cx::StringPropertyActiveVideoSource.
Definition at line 126 of file cxStringPropertyBase.h.
|
inlinevirtual |
Implements cx::Property.
Reimplemented in cx::StringProperty.
Definition at line 112 of file cxStringPropertyBase.h.
|
pure virtual |
get the data value.
Implemented in cx::StringPropertyGlyphLUT, cx::StringPropertyGlyphColorArray, cx::StringPropertyGlyphOrientationArray, cx::StringPropertyImageType, cx::StringPropertyDataModality, cx::StringPropertyDataUidEditable, cx::StringPropertyDataNameEditable, cx::StringPropertySelectTrackedStream, cx::StringPropertyParentFrame, cx::StringPropertySelectMesh, cx::StringPropertySelectData, cx::StringPropertySelectImage, cx::StringPropertyActiveProbeConfiguration, cx::StringPropertySelectRecordSession, cx::StringPropertySelectCoordinateSystem, cx::StringPropertyActiveImage, cx::StringPropertyRegistrationMovingImage, cx::StringProperty, cx::StringPropertySelectTool, cx::StringPropertyFusedInputOutputSelectData, cx::StringPropertyActiveTool, cx::StringPropertyClipPlane, cx::StringPropertyRegistrationFixedImage, cx::StringPropertyActiveVideoSource, cx::StringPropertyActiveData, and cx::StringPropertySelectPointMetric.
|
inlinevirtual |
Implements cx::Property.
Definition at line 103 of file cxStringPropertyBase.h.
|
inlinevirtual |
Reimplemented in cx::StringPropertyGlyphLUT, cx::StringPropertyGlyphColorArray, cx::StringPropertyGlyphOrientationArray, cx::StringPropertyImageType, cx::StringPropertyDataModality, cx::StringPropertyParentFrame, cx::StringPropertyActiveProbeConfiguration, cx::StringProperty, cx::StringPropertySelectTool, cx::StringPropertyFusedInputOutputSelectData, cx::StringPropertyActiveTool, cx::StringPropertyClipPlane, cx::SelectDataStringPropertyBase, cx::StringPropertySelectRecordSessionBase, cx::StringPropertySelectCoordinateSystemBase, and cx::StringPropertyActiveVideoSource.
Definition at line 130 of file cxStringPropertyBase.h.
|
inlinevirtual |
Reimplemented in cx::StringPropertyDataUidEditable, cx::StringPropertyDataNameEditable, and cx::StringProperty.
Definition at line 120 of file cxStringPropertyBase.h.
|
inlinevirtual |
Definition at line 139 of file cxStringPropertyBase.h.
|
pure virtual |
set the data value.
Implemented in cx::StringPropertyGlyphLUT, cx::StringPropertyGlyphColorArray, cx::StringPropertyGlyphOrientationArray, cx::StringPropertyImageType, cx::StringPropertyDataModality, cx::StringPropertyDataUidEditable, cx::StringPropertyDataNameEditable, cx::StringPropertySetParentFrame, cx::StringPropertySelectTrackedStream, cx::StringPropertyParentFrame, cx::StringPropertySelectMesh, cx::StringPropertySelectData, cx::StringPropertySelectImage, cx::StringPropertyActiveProbeConfiguration, cx::StringPropertySelectRecordSession, cx::StringPropertySelectCoordinateSystem, cx::StringPropertyActiveImage, cx::StringPropertyRegistrationMovingImage, cx::StringProperty, cx::StringPropertySelectTool, cx::StringPropertyFusedInputOutputSelectData, cx::StringPropertyActiveTool, cx::StringPropertyClipPlane, cx::StringPropertyRegistrationFixedImage, cx::StringPropertyActiveVideoSource, cx::StringPropertyActiveData, and cx::StringPropertySelectPointMetric.
|
inlinevirtual |
Implements cx::Property.
Definition at line 107 of file cxStringPropertyBase.h.
|
protected |
Definition at line 140 of file cxStringPropertyBase.h.