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

#include <cxDoublePropertyBase.h>

Inheritance diagram for cx::DoublePropertyBase:
cx::Property cx::DoubleProperty cx::DoublePropertyActiveImageBase cx::DoublePropertyActiveToolOffset cx::DoublePropertyImageTFDataBase cx::DoublePropertyNull cx::DoublePropertyOutputValueParams cx::DoublePropertyShadingBase cx::DoublePropertyTimeCalibration cx::DoublePropertyToolOffset cx::Vector3DComponentProperty

Public Types

enum  GuiRepresentation { grSPINBOX, grSLIDER, grDIAL }
 

Public Member Functions

 DoublePropertyBase ()
 
virtual ~DoublePropertyBase ()
 
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 (double value)=0
 set the data value. More...
 
virtual double getValue () const =0
 get the data value. More...
 
virtual void setGuiRepresentation (GuiRepresentation type)
 
virtual GuiRepresentation getGuiRepresentation ()
 
virtual DoubleRange getValueRange () const
 
- 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 double-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(double value);
    virtual double 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 DoubleRange getValueRange() const;
    virtual int getValueDecimals() const;

If there is a difference between the internal data representation and how you want to present them, use:

    virtual double convertInternal2Display(double internal);
    virtual double convertDisplay2Internal(double display);

When testing, or during development, you can use the DoublePropertyNull as a dummy implementation.

Definition at line 70 of file cxDoublePropertyBase.h.

Member Enumeration Documentation

◆ GuiRepresentation

Enumerator
grSPINBOX 
grSLIDER 
grDIAL 

Definition at line 78 of file cxDoublePropertyBase.h.

Constructor & Destructor Documentation

◆ DoublePropertyBase()

cx::DoublePropertyBase::DoublePropertyBase ( )
inline

Definition at line 74 of file cxDoublePropertyBase.h.

◆ ~DoublePropertyBase()

virtual cx::DoublePropertyBase::~DoublePropertyBase ( )
inlinevirtual

Definition at line 75 of file cxDoublePropertyBase.h.

Member Function Documentation

◆ getDisplayName()

◆ getGuiRepresentation()

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

Definition at line 103 of file cxDoublePropertyBase.h.

◆ getUid()

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

Implements cx::Property.

Reimplemented in cx::DoubleProperty.

Definition at line 98 of file cxDoublePropertyBase.h.

◆ getValue()

◆ getValueAsVariant()

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

Implements cx::Property.

Definition at line 88 of file cxDoublePropertyBase.h.

◆ getValueRange()

◆ setGuiRepresentation()

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

Definition at line 102 of file cxDoublePropertyBase.h.

◆ setValue()

◆ setValueFromVariant()

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

Implements cx::Property.

Definition at line 92 of file cxDoublePropertyBase.h.

Member Data Documentation

◆ mGuiRepresentation

GuiRepresentation cx::DoublePropertyBase::mGuiRepresentation
protected

Definition at line 129 of file cxDoublePropertyBase.h.


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