Fraxinus  16.5.0-fx-rc7
An IGT application
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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 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)
 

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

Member Enumeration Documentation

Enumerator
grSTRING 
grFILENAME 

Definition at line 94 of file cxStringPropertyBase.h.

Constructor & Destructor Documentation

cx::StringPropertyBase::StringPropertyBase ( )
inline

Definition at line 90 of file cxStringPropertyBase.h.

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

Definition at line 91 of file cxStringPropertyBase.h.

Member Function Documentation

virtual QString cx::StringPropertyBase::convertInternal2Display ( QString  internal)
inlinevirtual
virtual bool cx::StringPropertyBase::getAllowOnlyValuesInRange ( ) const
inlinevirtual
virtual GuiRepresentation cx::StringPropertyBase::getGuiRepresentation ( )
inlinevirtual

Definition at line 140 of file cxStringPropertyBase.h.

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

Implements cx::Property.

Reimplemented in cx::StringProperty.

Definition at line 112 of file cxStringPropertyBase.h.

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

Implements cx::Property.

Definition at line 103 of file cxStringPropertyBase.h.

virtual bool cx::StringPropertyBase::isReadOnly ( ) const
inlinevirtual
virtual void cx::StringPropertyBase::setGuiRepresentation ( GuiRepresentation  type)
inlinevirtual

Definition at line 139 of file cxStringPropertyBase.h.

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

Implements cx::Property.

Definition at line 107 of file cxStringPropertyBase.h.

Member Data Documentation

GuiRepresentation cx::StringPropertyBase::mGuiRepresentation
protected

Definition at line 140 of file cxStringPropertyBase.h.


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