Qt Virtual Chart Table (QVCT)
COverlayObject Class Referenceabstract

Generic overlay object. More...

#include <overlays/COverlayObject.hpp>

Inheritance diagram for COverlayObject:
COverlayContainer COverlayItem CLandmarkContainer CRouteContainer CTrackContainer CTrackSubContainer CVesselContainer CDevice COverlayPoint CVesselContainerDevice CVesselPointDevice

Public Types

enum  EType {
  OVERLAY = 1001 , CONTAINER = 1010 , SUBCONTAINER = 1011 , ITEM = 1100 ,
  SUBITEM1 = 1101 , SUBITEM2 = 1102
}
 Overlay object type. More...
 

Public Member Functions

void setName (const QString &_rqsName)
 Sets this object's name. More...
 
QString getName () const
 Returns this object's name. More...
 
virtual COverlayuseOverlay ()=0
 Returns this object's (base) overlay. More...
 
virtual void serialize (QDataStream &_rqDataStream) const
 Serializes (store) this object's data to binary format. More...
 
virtual void unserialize (QDataStream &_rqDataStream)
 Unserializes (restore) this object's data from binary format. More...
 
virtual void draw (const CChart *_poChart, QPainter *_pqPainter)=0
 Draws this object (itself or its content) More...
 
virtual void showDetail ()=0
 Displays this object's details (in the appropriate widget/view) More...
 
virtual void showEdit ()=0
 Displays this object's edit widget/view. More...
 
QString newChildName (const QString &_rqsName, int _iZeroPrefix=0, bool _bForceSuffix=false) const
 Returns a valid (non-duplicate) name for a new sibling of this object. More...
 
QString newChildName (const QString &_rqsName, int _iZeroPrefix, int _iSuffix) const
 Returns a suffixed (potentially duplicate) name for a new sibling of this object. More...
 

Protected Member Functions

 COverlayObject (EType _eType, const QString &_rqsName)
 
virtual ~COverlayObject ()
 

Protected Attributes

QString qsName
 Object name. More...
 

Detailed Description

Generic overlay object.

This class defines the generic representation of any (hierarchical) object used in an overlay.

See also
COverlay
Author
Cedric Dufour http://cedric.dufour.name

Definition at line 38 of file COverlayObject.hpp.

Member Enumeration Documentation

◆ EType

Overlay object type.

Enumerator
OVERLAY 

(Base) overlay

CONTAINER 

Container.

SUBCONTAINER 

Sub-container.

ITEM 

Item.

SUBITEM1 

Sub-item (type 1)

SUBITEM2 

Sub-item (type 2)

Definition at line 48 of file COverlayObject.hpp.

Constructor & Destructor Documentation

◆ COverlayObject()

COverlayObject::COverlayObject ( COverlayObject::EType  _eType,
const QString &  _rqsName 
)
protected

Definition at line 31 of file COverlayObject.cpp.

◆ ~COverlayObject()

virtual COverlayObject::~COverlayObject ( )
inlineprotectedvirtual

Definition at line 74 of file COverlayObject.hpp.

Member Function Documentation

◆ setName()

void COverlayObject::setName ( const QString &  _rqsName)
inline

Sets this object's name.

Definition at line 84 of file COverlayObject.hpp.

◆ getName()

QString COverlayObject::getName ( ) const
inline

Returns this object's name.

Definition at line 89 of file COverlayObject.hpp.

◆ useOverlay()

virtual COverlay* COverlayObject::useOverlay ( )
pure virtual

◆ serialize()

void COverlayObject::serialize ( QDataStream &  _rqDataStream) const
virtual

Serializes (store) this object's data to binary format.

Reimplemented in CVesselPointDevice, CVesselContainerDevice, CVesselPoint, CVesselContainer, CTrackContainer, CRoutePoint, CRouteContainer, CLandmarkPoint, COverlayPoint, COverlayCourse, and CDevice.

Definition at line 45 of file COverlayObject.cpp.

◆ unserialize()

void COverlayObject::unserialize ( QDataStream &  _rqDataStream)
virtual

◆ draw()

virtual void COverlayObject::draw ( const CChart _poChart,
QPainter *  _pqPainter 
)
pure virtual

◆ showDetail()

virtual void COverlayObject::showDetail ( )
pure virtual

◆ showEdit()

◆ newChildName() [1/2]

QString COverlayObject::newChildName ( const QString &  _rqsName,
int  _iZeroPrefix = 0,
bool  _bForceSuffix = false 
) const

Returns a valid (non-duplicate) name for a new sibling of this object.

This method checks and returns a valid name for a new sibling of this object, such as no duplicate is created. If the given name matches an existing sibling, it is automatically suffixed with a number, prefixed with the given quantity of "0" (e.g. "Object(01)")

Definition at line 55 of file COverlayObject.cpp.

◆ newChildName() [2/2]

QString COverlayObject::newChildName ( const QString &  _rqsName,
int  _iZeroPrefix,
int  _iSuffix 
) const

Returns a suffixed (potentially duplicate) name for a new sibling of this object.

This method DOET NOT check if another sibling exists with the same name and suffix. It merely adds the given suffix to the given name, prefixed with the given quantity of "0" (e.g. "Object(01)")

Definition at line 79 of file COverlayObject.cpp.

Member Data Documentation

◆ qsName

QString COverlayObject::qsName
protected

Object name.

See also
setName(), getName()

Definition at line 65 of file COverlayObject.hpp.


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