NorMIT-nav  2023.01.05-dev+develop.0da12
An IGT application
cx::StringPropertyBase Class Referenceabstract

Abstract interface for interaction with internal string-valued data. More...

#include <cxStringPropertyBase.h>

Inheritance diagram for cx::StringPropertyBase:
cx::Property cx::SelectDataStringPropertyBase cx::StringProperty cx::StringPropertyActiveProbeConfiguration cx::StringPropertyActiveTool cx::StringPropertyActiveVideoSource cx::StringPropertyClipPlane cx::StringPropertyDataModality cx::StringPropertyDataNameEditable cx::StringPropertyDataUidEditable cx::StringPropertyGlyphColorArray cx::StringPropertyGlyphLUT cx::StringPropertyGlyphOrientationArray cx::StringPropertyImageType cx::StringPropertyParentFrame cx::StringPropertySelectCoordinateSystemBase cx::StringPropertySelectRecordSessionBase cx::StringPropertySelectTool

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 QStringList getValueRange () const
 
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)
 

Detailed Description

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 65 of file cxStringPropertyBase.h.

Member Enumeration Documentation

◆ GuiRepresentation

Enumerator
grSTRING 
grFILENAME 

Definition at line 73 of file cxStringPropertyBase.h.

Constructor & Destructor Documentation

◆ StringPropertyBase()

cx::StringPropertyBase::StringPropertyBase ( )
inline

Definition at line 69 of file cxStringPropertyBase.h.

◆ ~StringPropertyBase()

virtual cx::StringPropertyBase::~StringPropertyBase ( )
inlinevirtual

Definition at line 70 of file cxStringPropertyBase.h.

Member Function Documentation

◆ getAllowOnlyValuesInRange()

virtual bool cx::StringPropertyBase::getAllowOnlyValuesInRange ( ) const
inlinevirtual

◆ getDisplayName()

◆ getGuiRepresentation()

virtual GuiRepresentation cx::StringPropertyBase::getGuiRepresentation ( )
inlinevirtual

Definition at line 119 of file cxStringPropertyBase.h.

◆ getUid()

virtual QString cx::StringPropertyBase::getUid ( ) const
inlinevirtual

Implements cx::Property.

Reimplemented in cx::StringProperty.

Definition at line 91 of file cxStringPropertyBase.h.

◆ getValue()

◆ getValueAsVariant()

virtual QVariant cx::StringPropertyBase::getValueAsVariant ( ) const
inlinevirtual

Implements cx::Property.

Definition at line 82 of file cxStringPropertyBase.h.

◆ getValueRange()

◆ isReadOnly()

virtual bool cx::StringPropertyBase::isReadOnly ( ) const
inlinevirtual

◆ setGuiRepresentation()

virtual void cx::StringPropertyBase::setGuiRepresentation ( GuiRepresentation  type)
inlinevirtual

Definition at line 118 of file cxStringPropertyBase.h.

◆ setValue()

◆ setValueFromVariant()

virtual void cx::StringPropertyBase::setValueFromVariant ( QVariant  val)
inlinevirtual

Implements cx::Property.

Definition at line 86 of file cxStringPropertyBase.h.

Member Data Documentation

◆ mGuiRepresentation

GuiRepresentation cx::StringPropertyBase::mGuiRepresentation
protected

Definition at line 119 of file cxStringPropertyBase.h.


The documentation for this class was generated from the following file: