Qt Virtual Chart Table (QVCT)
|
Generic overlay point. More...
#include <overlays/COverlayPoint.hpp>
Public Types | |
enum | ETagPosition { TAG_AUTO , TAG_LEFT , TAG_RIGHT } |
Public Types inherited from COverlayObject | |
enum | EType { OVERLAY = 1001 , CONTAINER = 1010 , SUBCONTAINER = 1011 , ITEM = 1100 , SUBITEM1 = 1101 , SUBITEM2 = 1102 } |
Overlay object type. More... | |
Public Member Functions | |
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 | drawText (const CChart *_poChart, QPainter *_pqPainter, const QString &_rqsText, const QPointF &_rqPointFScrPosition, bool _bItalic=false) |
Draws the given text, at the given screen position. More... | |
virtual void | drawLine (const CChart *_poChart, QPainter *_pqPainter, const COverlayPoint *_poOverlayPoint) |
Draws a line (between this and the other specified point), including distance/bearing data. More... | |
virtual void | drawMarker (const CChart *_poChart, QPainter *_pqPainter, const CDataPositionValidity *_poDataPositionValidity=0, bool _bSelected=false) |
Draws the point (marker) More... | |
virtual void | drawSymbol (const CChart *_poChart, QPainter *_pqPainter, const QString &_rqsSymbol) |
Draws the symbol (user-defined) More... | |
virtual void | drawTag (const CChart *_poChart, QPainter *_pqPainter, ETagPosition _eTagPosition=TAG_AUTO, const CDataTimeValidity *_poDataTimeValidity=0, const CDataPositionValidity *_poDataPositionValidity=0) |
Draws the tag (name) More... | |
virtual bool | matchScrPosition (const CChart *_poChart, const QPointF &_rqPointFScrPosition) const |
Returns whether this point matches the given screen position. More... | |
Public Member Functions inherited from COverlayItem | |
void | setMultiSelected (bool _bMultiSelected) |
Sets this item's selection status. More... | |
bool | isMultiSelected () const |
Returns this item's selection status. 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... | |
virtual COverlay * | useOverlay ()=0 |
Returns this object's (base) overlay. 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... | |
Public Member Functions inherited from COverlayVisibility | |
void | setVisible (bool _bVisible) |
Sets the point's (marker) visibility status. 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 | 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... | |
Public Member Functions inherited from CDataTime | |
CDataTime (double _fdTime=UNDEFINED_TIME) | |
CDataTime (const CDataTime &_roDataTime) | |
virtual | ~CDataTime () |
void | setTime (double _fdTime) |
Sets the time, in seconds from Unix epoch. More... | |
void | setTime (time_t _tSeconds, long _lNanoSeconds) |
Sets the time, in seconds from Unix epoch, using timespec stanza. More... | |
void | setTime (const CDataTime &_roDataTime) |
Copy time from another time object. More... | |
void | resetTime () |
Resets the time (to an undefined Time) More... | |
double | getTime () const |
Returns this time's time, in seconds from Unix epoch. More... | |
void | serialize (QDataStream &_rqDataStream) const |
Serializes (store) this object's data to binary format. More... | |
void | unserialize (QDataStream &_rqDataStream) |
Unserializes (restore) this object's data from binary format. More... | |
bool | operator== (const CDataTime &_roTime) const |
Equality operator. More... | |
bool | operator!= (const CDataTime &_roTime) const |
Inequality operator. More... | |
Public Member Functions inherited from CDataPosition | |
CDataPosition () | |
CDataPosition (double _fdLongitude, double _fdLatitude, double _fdElevation=UNDEFINED_ELEVATION) | |
CDataPosition (const CDataPosition &_roDataPosition) | |
virtual | ~CDataPosition () |
void | setPosition (double _fdLongitude, double _fdLatitude, double _fdElevation=UNDEFINED_ELEVATION) |
Sets new coordinates. More... | |
void | setPosition (const CDataPosition &_roDataPosition) |
Copy coordinates from another position. More... | |
void | resetPosition () |
Resets all coordinates (to an undefined position) More... | |
void | setElevation (double _fdElevation) |
Sets the elevation, in meters. More... | |
void | resetElevation () |
Resets the elevation (to an undefined elevation) More... | |
double | getLongitude () const |
Returns this position's longitude, in degrees. More... | |
double | getLatitude () const |
Returns this position's latitude, in degrees. More... | |
double | getElevation () const |
Returns this position's elevation, in meters. More... | |
void | serialize (QDataStream &_rqDataStream) const |
Serializes (store) this object's data to binary format. More... | |
void | unserialize (QDataStream &_rqDataStream) |
Unserializes (restore) this object's data from binary format. More... | |
bool | operator== (const CDataPosition &_roPosition) const |
Equality operator. More... | |
bool | operator!= (const CDataPosition &_roPosition) const |
Inequality operator. More... | |
Static Public Member Functions | |
static int | getPositionBox (const QTreeWidgetItem *_pqTreeWidgetItem, CDataPosition *_poDataPositionLower, CDataPosition *_poDataPositionUpper, int _iIndexMin=0, int _iIndexMax=-1) |
Returns the minimal geographical positions box containing the points in the given overlay/container. More... | |
Static Public Member Functions inherited from CDataTime | |
static bool | compareTimeAscending (const CDataTime &_roTime1, const CDataTime &_roTime2) |
Time (ascending sort) comparison operator. More... | |
static bool | compareTimeDescending (const CDataTime &_roTime1, const CDataTime &_roTime2) |
Time (descending sort) comparison operator. More... | |
Static Public Member Functions inherited from CDataPosition | |
static double | distanceGC (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Returns the WGS84-corrected great-circle distance between two points, in meters. More... | |
static double | bearingGC (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Returns the great-circle (initial) bearing between two points, in degrees. More... | |
static double | distanceRL (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Returns the rhumb-line distance between two points, in meters. More... | |
static double | bearingRL (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Returns the rhumb-line (constant) bearing between two points, in degrees. More... | |
static double | length (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Returns the length (rhumb-line distance and elevation delta) between two points, in meters. More... | |
static bool | compareLongitudeAscending (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Longitude (ascending sort) comparison operator. More... | |
static bool | compareLongitudeDescending (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Longitude (descending sort) comparison operator. More... | |
static bool | compareLatitudeAscending (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Latitude (ascending sort) comparison operator. More... | |
static bool | compareLatitudeDescending (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Latitude (descending sort) comparison operator. More... | |
static bool | compareElevationAscending (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Elevation (ascending sort) comparison operator. More... | |
static bool | compareElevationDescending (const CDataPosition &_roPosition1, const CDataPosition &_roPosition2) |
Elevation (descending sort) comparison operator. More... | |
Protected Member Functions | |
COverlayPoint (const QString &_rqsName) | |
COverlayPoint (const QString &_rqsName, const CDataPosition &_roDataPosition) | |
virtual | ~COverlayPoint () |
Protected Member Functions inherited from COverlayItem | |
COverlayItem (COverlayObject::EType _eType, const QString &_rqsName) | |
virtual | ~COverlayItem () |
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... | |
Additional Inherited Members | |
Static Public Attributes inherited from CDataTime | |
static constexpr double | UNDEFINED_TIME = -9999999 |
Specific value for an undefined time. More... | |
static const CDataTime | UNDEFINED |
Specific value for an undefined time object. More... | |
Static Public Attributes inherited from CDataPosition | |
static constexpr double | UNDEFINED_LONGITUDE = -999 |
Specific value for an undefined longitude. More... | |
static constexpr double | UNDEFINED_LATITUDE = -99 |
Specific value for an undefined latitude. More... | |
static constexpr double | UNDEFINED_ELEVATION = -9999999 |
Specific value for an undefined elevation. More... | |
static const CDataPosition | UNDEFINED |
Specific value for an undefined position. More... | |
Protected Attributes inherited from COverlayItem | |
bool | bMultiSelected |
Item's selection 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... | |
Generic overlay point.
This class defines the generic representation of a point (geographical position and UTC time) used in an overlay.
Definition at line 45 of file COverlayPoint.hpp.
Enumerator | |
---|---|
TAG_AUTO | |
TAG_LEFT | |
TAG_RIGHT |
Definition at line 53 of file COverlayPoint.hpp.
|
protected |
Definition at line 45 of file COverlayPoint.cpp.
|
protected |
Definition at line 51 of file COverlayPoint.cpp.
|
inlineprotectedvirtual |
Definition at line 75 of file COverlayPoint.hpp.
|
static |
Returns the minimal geographical positions box containing the points in the given overlay/container.
[in] | _pqTreeWidgetItem | Overlay/container to search for points |
[in,out] | _poDataPositionLower | The lower coordinates of valid points [in] and bounding box [out] |
[in,out] | _poDataPositionUpper | The upper coordinates of valid points [in] and bounding box [out] |
[in] | _iIndexMin | Minimal index of valid points (within overlay/container) |
[in] | _iIndexMax | Maximal index of valid points (within overlay/container) |
Definition at line 62 of file COverlayPoint.cpp.
|
virtual |
Serializes (store) this object's data to binary format.
Reimplemented from COverlayObject.
Reimplemented in CVesselPoint, CRoutePoint, CLandmarkPoint, and COverlayCourse.
Definition at line 146 of file COverlayPoint.cpp.
|
virtual |
Unserializes (restore) this object's data from binary format.
Reimplemented from COverlayObject.
Reimplemented in CVesselPoint, CTrackPoint, CRoutePoint, CLandmarkPoint, and COverlayCourse.
Definition at line 152 of file COverlayPoint.cpp.
|
virtual |
Draws the given text, at the given screen position.
Definition at line 167 of file COverlayPoint.cpp.
|
virtual |
Draws a line (between this and the other specified point), including distance/bearing data.
Definition at line 393 of file COverlayPoint.cpp.
|
virtual |
Draws the point (marker)
Reimplemented in COverlayCourse.
Definition at line 205 of file COverlayPoint.cpp.
|
virtual |
Draws the symbol (user-defined)
Definition at line 252 of file COverlayPoint.cpp.
|
virtual |
Draws the tag (name)
Definition at line 273 of file COverlayPoint.cpp.
|
virtual |
Returns whether this point matches the given screen position.
Reimplemented in CVesselPoint, CTrackPoint, CRoutePoint, and CLandmarkPoint.
Definition at line 438 of file COverlayPoint.cpp.