Qt Virtual Chart Table (QVCT)
CVesselContainer Class Reference

[UI] Vessel overlay container / flotilla More...

#include <overlays/vessel/CVesselContainer.hpp>

Inheritance diagram for CVesselContainer:
COverlayContainer COverlayVisibility COverlayObject

Public Member Functions

 CVesselContainer (const QString &_rqsName)
 
virtual ~CVesselContainer ()
 
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 COverlayuseOverlay ()
 Returns this object's (base) overlay. More...
 
virtual void draw (const CChart *_poChart, QPainter *_pqPainter)
 Draws this object (itself or its content) More...
 
virtual void showDetail ()
 Displays this object's details (in the appropriate widget/view) More...
 
virtual void showEdit ()
 Displays this object's edit widget/view. More...
 
virtual COverlayPointmatchScrPosition (const CChart *_poChart, const QPointF &_rqPointFScrPosition) const
 Returns the overlay container's point that (first) matches the given screen position (0 if none is found) More...
 
virtual void setVisibleName (bool _bVisibleName)
 Sets the name's (tag) visibility status. More...
 
virtual void setVisiblePosition (bool _bVisiblePosition)
 Sets the position's visibility status. More...
 
virtual void setVisibleCourse (bool _bVisibleCourse)
 Sets the course's visibility status. More...
 
virtual void toggleVisibility ()
 
void setType (const QString &_rqsType)
 Sets this flotilla's type. More...
 
void setDescription (const QString &_rqsDescription)
 Sets this flotilla's description. More...
 
void setComment (const QString &_rqsComment)
 Sets this flotilla's comment. More...
 
void setUrl (const QString &_rqsUrl)
 Sets this flotilla's URL. More...
 
bool isDynamic ()
 Returns this flotilla's dynamic status. More...
 
bool isDeviceConnected () const
 Returns whether this flotilla's vessels devices are all connected. More...
 
QString getType () const
 Returns this flotilla's type. More...
 
QString getDescription () const
 Returns this flotilla's description. More...
 
QString getComment () const
 Returns this flotilla's comment. More...
 
QString getUrl () const
 Returns this flotilla's URL. More...
 
void setDevice (CVesselContainerDevice *_poVesselContainerDevice)
 Sets a device to dynamically generate this flotilla. More...
 
void connectDevice ()
 Connects all children vessels devices. More...
 
void disconnectDevice ()
 Disconnects all children vessels devices. More...
 
void clearDevice ()
 Clears the device set to dynamically generate this flotilla. More...
 
CVesselPointaddPoint (const QString &_rqsName, const CDataPosition &_roDataPosition=CDataPosition::UNDEFINED)
 Add a new vessel (item/point) to this container. More...
 
void addPointDynamic (const CDeviceDataFix &_roDeviceDataFix, const QString &_rqsDeviceName)
 Add a new dynamic vessel (item/point) with the given data fix to this container. More...
 
int cleanPointDynamic (int _iTTL)
 Deletes dynamic vessels (items/points) that have not been updated for the given "time-to-live" seconds. More...
 
int parseQVCT (const QDomElement &_rqDomElement)
 Retrieves this object's content from the given QVCT source (file) More...
 
void dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter, bool bOnlySelected=false) const
 Stores this object's content to the given QVCT destination (file) More...
 
int deleteSelection ()
 Deletes selected items within this container. More...
 
- Public Member Functions inherited from COverlayObject
void setName (const QString &_rqsName)
 Sets this object's name. More...
 
QString getName () const
 Returns this object's name. 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...
 
- Public Member Functions inherited from COverlayVisibility
void setVisible (bool _bVisible)
 Sets the point's (marker) visibility status. More...
 
virtual void setVisibleRouting (bool _bVisibleRouting)
 Sets the routing's (data) visibility status. More...
 
void setVisibility (int _iVisibilityCode)
 Sets the global (coded) visibility status. More...
 
bool isVisible () const
 Returns the point's (marker) visibility status. More...
 
bool isVisibleName () const
 Returns the tag's (name) visibility status. More...
 
bool isVisiblePosition () const
 Returns the position's visibility status. More...
 
bool isVisibleCourse () const
 Returns the course's visibility status. More...
 
bool isVisibleRouting () const
 Returns the routing's (data) visibility status. More...
 
int getVisibility () const
 Returns the global (coded) visibility status. More...
 

Private Slots

void slotTimerDynamicCleanup ()
 [Slot] Slot to handle activity signal emitted by device More...
 

Private Member Functions

void clear ()
 Clear the entire content of this container. More...
 

Private Attributes

bool bDynamic
 Dynamic status. More...
 
QTimer * pqTimerDynamicCleanup
 Dynamic flotilla clean-up timer. More...
 
QString qsType
 Vessel's type. More...
 
QString qsDescription
 Vessel's description. More...
 
QString qsComment
 Vessel's comment. More...
 
QString qsUrl
 Vessel's URL. More...
 

Additional Inherited Members

- Public Types inherited from COverlayObject
enum  EType {
  OVERLAY = 1001, CONTAINER = 1010, SUBCONTAINER = 1011, ITEM = 1100,
  SUBITEM1 = 1101, SUBITEM2 = 1102
}
 Overlay object type. More...
 
- Protected Member Functions inherited from COverlayContainer
 COverlayContainer (COverlayObject::EType _eType, const QString &_rqsName)
 
virtual ~COverlayContainer ()
 
- Protected Member Functions inherited from COverlayObject
 COverlayObject (EType _eType, const QString &_rqsName)
 
virtual ~COverlayObject ()
 
- Protected Member Functions inherited from COverlayVisibility
 COverlayVisibility ()
 
virtual ~COverlayVisibility ()
 
virtual void toggleVisibility (bool _bIncludeCourse, bool _bIncludeRouting)
 Toggle the visibility status. More...
 
- Protected Attributes inherited from COverlayObject
QString qsName
 Object name. More...
 
- Protected Attributes inherited from COverlayVisibility
bool bVisible
 Global (marker) visibility status. More...
 
bool bVisibleName
 Name's (tag) visibility status. More...
 
bool bVisiblePosition
 Position's visibility status. More...
 
bool bVisibleCourse
 Course's visibility status. More...
 
bool bVisibleRouting
 Routing's (data) visibility status. More...
 

Detailed Description

[UI] Vessel overlay container / flotilla

This class implements the overlay container for the vessel overlay.

Author
Cedric Dufour http://cedric.dufour.name

Definition at line 46 of file CVesselContainer.hpp.

Constructor & Destructor Documentation

◆ CVesselContainer()

CVesselContainer::CVesselContainer ( const QString &  _rqsName)

Definition at line 43 of file CVesselContainer.cpp.

◆ ~CVesselContainer()

CVesselContainer::~CVesselContainer ( )
virtual

Definition at line 58 of file CVesselContainer.cpp.

Member Function Documentation

◆ serialize()

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

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

Reimplemented from COverlayObject.

Definition at line 68 of file CVesselContainer.cpp.

◆ unserialize()

void CVesselContainer::unserialize ( QDataStream &  _rqDataStream)
virtual

Unserializes (restore) this object's data from binary format.

Reimplemented from COverlayObject.

Definition at line 74 of file CVesselContainer.cpp.

◆ useOverlay()

virtual COverlay* CVesselContainer::useOverlay ( )
inlinevirtual

Returns this object's (base) overlay.

Implements COverlayObject.

Definition at line 94 of file CVesselContainer.hpp.

◆ draw()

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

Draws this object (itself or its content)

Implements COverlayObject.

Definition at line 81 of file CVesselContainer.cpp.

◆ showDetail()

void CVesselContainer::showDetail ( )
virtual

Displays this object's details (in the appropriate widget/view)

Implements COverlayObject.

Definition at line 89 of file CVesselContainer.cpp.

◆ showEdit()

void CVesselContainer::showEdit ( )
virtual

Displays this object's edit widget/view.

Implements COverlayObject.

Definition at line 98 of file CVesselContainer.cpp.

◆ matchScrPosition()

COverlayPoint * CVesselContainer::matchScrPosition ( const CChart _poChart,
const QPointF &  _rqPointFScrPosition 
) const
virtual

Returns the overlay container's point that (first) matches the given screen position (0 if none is found)

Implements COverlayContainer.

Definition at line 110 of file CVesselContainer.cpp.

◆ setVisibleName()

void CVesselContainer::setVisibleName ( bool  _bVisibleName)
virtual

Sets the name's (tag) visibility status.

Reimplemented from COverlayVisibility.

Definition at line 128 of file CVesselContainer.cpp.

◆ setVisiblePosition()

void CVesselContainer::setVisiblePosition ( bool  _bVisiblePosition)
virtual

Sets the position's visibility status.

Reimplemented from COverlayVisibility.

Definition at line 136 of file CVesselContainer.cpp.

◆ setVisibleCourse()

void CVesselContainer::setVisibleCourse ( bool  _bVisibleCourse)
virtual

Sets the course's visibility status.

Reimplemented from COverlayVisibility.

Definition at line 144 of file CVesselContainer.cpp.

◆ toggleVisibility()

void CVesselContainer::toggleVisibility ( )
virtual

Definition at line 152 of file CVesselContainer.cpp.

◆ slotTimerDynamicCleanup

void CVesselContainer::slotTimerDynamicCleanup ( )
privateslot

[Slot] Slot to handle activity signal emitted by device

Definition at line 176 of file CVesselContainer.cpp.

◆ setType()

void CVesselContainer::setType ( const QString &  _rqsType)
inline

Sets this flotilla's type.

Definition at line 133 of file CVesselContainer.hpp.

◆ setDescription()

void CVesselContainer::setDescription ( const QString &  _rqsDescription)
inline

Sets this flotilla's description.

Definition at line 135 of file CVesselContainer.hpp.

◆ setComment()

void CVesselContainer::setComment ( const QString &  _rqsComment)
inline

Sets this flotilla's comment.

Definition at line 137 of file CVesselContainer.hpp.

◆ setUrl()

void CVesselContainer::setUrl ( const QString &  _rqsUrl)
inline

Sets this flotilla's URL.

Definition at line 139 of file CVesselContainer.hpp.

◆ isDynamic()

bool CVesselContainer::isDynamic ( )
inline

Returns this flotilla's dynamic status.

Definition at line 144 of file CVesselContainer.hpp.

◆ isDeviceConnected()

bool CVesselContainer::isDeviceConnected ( ) const

Returns whether this flotilla's vessels devices are all connected.

Definition at line 192 of file CVesselContainer.cpp.

◆ getType()

QString CVesselContainer::getType ( ) const
inline

Returns this flotilla's type.

Definition at line 149 of file CVesselContainer.hpp.

◆ getDescription()

QString CVesselContainer::getDescription ( ) const
inline

Returns this flotilla's description.

Definition at line 151 of file CVesselContainer.hpp.

◆ getComment()

QString CVesselContainer::getComment ( ) const
inline

Returns this flotilla's comment.

Definition at line 153 of file CVesselContainer.hpp.

◆ getUrl()

QString CVesselContainer::getUrl ( ) const
inline

Returns this flotilla's URL.

Definition at line 155 of file CVesselContainer.hpp.

◆ setDevice()

void CVesselContainer::setDevice ( CVesselContainerDevice _poVesselContainerDevice)

Sets a device to dynamically generate this flotilla.

Definition at line 204 of file CVesselContainer.cpp.

◆ connectDevice()

void CVesselContainer::connectDevice ( )

Connects all children vessels devices.

Definition at line 212 of file CVesselContainer.cpp.

◆ disconnectDevice()

void CVesselContainer::disconnectDevice ( )

Disconnects all children vessels devices.

Definition at line 220 of file CVesselContainer.cpp.

◆ clearDevice()

void CVesselContainer::clearDevice ( )

Clears the device set to dynamically generate this flotilla.

Definition at line 228 of file CVesselContainer.cpp.

◆ addPoint()

CVesselPoint * CVesselContainer::addPoint ( const QString &  _rqsName,
const CDataPosition _roDataPosition = CDataPosition::UNDEFINED 
)

Add a new vessel (item/point) to this container.

Definition at line 234 of file CVesselContainer.cpp.

◆ addPointDynamic()

void CVesselContainer::addPointDynamic ( const CDeviceDataFix _roDeviceDataFix,
const QString &  _rqsDeviceName 
)

Add a new dynamic vessel (item/point) with the given data fix to this container.

NOTE: If a vessel with a matching name already exists, none is created

Definition at line 243 of file CVesselContainer.cpp.

◆ cleanPointDynamic()

int CVesselContainer::cleanPointDynamic ( int  _iTTL)

Deletes dynamic vessels (items/points) that have not been updated for the given "time-to-live" seconds.

Definition at line 268 of file CVesselContainer.cpp.

◆ parseQVCT()

int CVesselContainer::parseQVCT ( const QDomElement &  _rqDomElement)

Retrieves this object's content from the given QVCT source (file)

Definition at line 288 of file CVesselContainer.cpp.

◆ dumpQVCT()

void CVesselContainer::dumpQVCT ( QXmlStreamWriter &  _rqXmlStreamWriter,
bool  bOnlySelected = false 
) const

Stores this object's content to the given QVCT destination (file)

Definition at line 319 of file CVesselContainer.cpp.

◆ deleteSelection()

int CVesselContainer::deleteSelection ( )

Deletes selected items within this container.

Definition at line 365 of file CVesselContainer.cpp.

◆ clear()

void CVesselContainer::clear ( )
private

Clear the entire content of this container.

Definition at line 381 of file CVesselContainer.cpp.

Member Data Documentation

◆ bDynamic

bool CVesselContainer::bDynamic
private

Dynamic status.

NOTE: A dynamic flotilla is one for which a device has been set and stored as its first child (index 0) and used to dynamically generate vessels (at indices > 0 ) based on what the device sends, with each vessel's name corresponding to the device source's name.

See also
setDevice(), clearDevice()

Definition at line 61 of file CVesselContainer.hpp.

◆ pqTimerDynamicCleanup

QTimer* CVesselContainer::pqTimerDynamicCleanup
private

Dynamic flotilla clean-up timer.

See also
slotTimerDynamicCleanup()

Definition at line 64 of file CVesselContainer.hpp.

◆ qsType

QString CVesselContainer::qsType
private

Vessel's type.

Definition at line 67 of file CVesselContainer.hpp.

◆ qsDescription

QString CVesselContainer::qsDescription
private

Vessel's description.

Definition at line 69 of file CVesselContainer.hpp.

◆ qsComment

QString CVesselContainer::qsComment
private

Vessel's comment.

Definition at line 71 of file CVesselContainer.hpp.

◆ qsUrl

QString CVesselContainer::qsUrl
private

Vessel's URL.

Definition at line 73 of file CVesselContainer.hpp.


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