Qt Virtual Chart Table (QVCT)
|
[UI] Vessel overlay container / flotilla More...
#include <overlays/vessel/CVesselContainer.hpp>
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 COverlay * | useOverlay () |
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 COverlayPoint * | matchScrPosition (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... | |
CVesselPoint * | addPoint (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... | |
Protected Member Functions | |
virtual void | toggleVisibility (bool _bIncludeCourse, bool _bIncludeRouting) |
Toggle the visibility status. 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... | |
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 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... | |
[UI] Vessel overlay container / flotilla
This class implements the overlay container for the vessel overlay.
Definition at line 46 of file CVesselContainer.hpp.
CVesselContainer::CVesselContainer | ( | const QString & | _rqsName | ) |
Definition at line 43 of file CVesselContainer.cpp.
|
virtual |
Definition at line 58 of file CVesselContainer.cpp.
|
virtual |
Serializes (store) this object's data to binary format.
Reimplemented from COverlayObject.
Definition at line 68 of file CVesselContainer.cpp.
|
virtual |
Unserializes (restore) this object's data from binary format.
Reimplemented from COverlayObject.
Definition at line 74 of file CVesselContainer.cpp.
|
inlinevirtual |
Returns this object's (base) overlay.
Implements COverlayObject.
Definition at line 94 of file CVesselContainer.hpp.
|
virtual |
Draws this object (itself or its content)
Implements COverlayObject.
Definition at line 81 of file CVesselContainer.cpp.
|
virtual |
Displays this object's details (in the appropriate widget/view)
Implements COverlayObject.
Definition at line 89 of file CVesselContainer.cpp.
|
virtual |
Displays this object's edit widget/view.
Implements COverlayObject.
Definition at line 98 of file CVesselContainer.cpp.
|
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.
|
virtual |
Sets the name's (tag) visibility status.
Reimplemented from COverlayVisibility.
Definition at line 128 of file CVesselContainer.cpp.
|
virtual |
Sets the position's visibility status.
Reimplemented from COverlayVisibility.
Definition at line 136 of file CVesselContainer.cpp.
|
virtual |
Sets the course's visibility status.
Reimplemented from COverlayVisibility.
Definition at line 144 of file CVesselContainer.cpp.
|
virtual |
Definition at line 152 of file CVesselContainer.cpp.
|
privateslot |
[Slot] Slot to handle activity signal emitted by device
Definition at line 176 of file CVesselContainer.cpp.
|
inline |
Sets this flotilla's type.
Definition at line 133 of file CVesselContainer.hpp.
|
inline |
Sets this flotilla's description.
Definition at line 135 of file CVesselContainer.hpp.
|
inline |
Sets this flotilla's comment.
Definition at line 137 of file CVesselContainer.hpp.
|
inline |
Sets this flotilla's URL.
Definition at line 139 of file CVesselContainer.hpp.
|
inline |
Returns this flotilla's dynamic status.
Definition at line 144 of file CVesselContainer.hpp.
bool CVesselContainer::isDeviceConnected | ( | ) | const |
Returns whether this flotilla's vessels devices are all connected.
Definition at line 192 of file CVesselContainer.cpp.
|
inline |
Returns this flotilla's type.
Definition at line 149 of file CVesselContainer.hpp.
|
inline |
Returns this flotilla's description.
Definition at line 151 of file CVesselContainer.hpp.
|
inline |
Returns this flotilla's comment.
Definition at line 153 of file CVesselContainer.hpp.
|
inline |
Returns this flotilla's URL.
Definition at line 155 of file CVesselContainer.hpp.
void CVesselContainer::setDevice | ( | CVesselContainerDevice * | _poVesselContainerDevice | ) |
Sets a device to dynamically generate this flotilla.
Definition at line 204 of file CVesselContainer.cpp.
void CVesselContainer::connectDevice | ( | ) |
Connects all children vessels devices.
Definition at line 212 of file CVesselContainer.cpp.
void CVesselContainer::disconnectDevice | ( | ) |
Disconnects all children vessels devices.
Definition at line 220 of file CVesselContainer.cpp.
void CVesselContainer::clearDevice | ( | ) |
Clears the device set to dynamically generate this flotilla.
Definition at line 228 of file CVesselContainer.cpp.
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.
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.
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.
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.
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.
int CVesselContainer::deleteSelection | ( | ) |
Deletes selected items within this container.
Definition at line 365 of file CVesselContainer.cpp.
|
private |
Clear the entire content of this container.
Definition at line 381 of file CVesselContainer.cpp.
|
protected |
Toggle the visibility status.
Definition at line 85 of file COverlayVisibility.cpp.
|
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.
Definition at line 61 of file CVesselContainer.hpp.
|
private |
Dynamic flotilla clean-up timer.
Definition at line 64 of file CVesselContainer.hpp.
|
private |
Vessel's type.
Definition at line 67 of file CVesselContainer.hpp.
|
private |
Vessel's description.
Definition at line 69 of file CVesselContainer.hpp.
|
private |
Vessel's comment.
Definition at line 71 of file CVesselContainer.hpp.
|
private |
Vessel's URL.
Definition at line 73 of file CVesselContainer.hpp.