Qt Virtual Chart Table (QVCT)
CRouteContainer Class Reference

[UI] Route overlay container More...

#include <overlays/route/CRouteContainer.hpp>

Inheritance diagram for CRouteContainer:
COverlayContainer COverlayVisibility COverlayObject

Public Member Functions

 CRouteContainer (const QString &_rqsName)
 
virtual ~CRouteContainer ()
 
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 setVisibleRouting (bool _bVisibleRouting)
 Sets the routing's (data) visibility status. More...
 
virtual void toggleVisibility ()
 
void setType (const QString &_rqsType)
 Sets this route's type. More...
 
void setDescription (const QString &_rqsDescription)
 Sets this route's description. More...
 
void setComment (const QString &_rqsComment)
 Sets this route's comment. More...
 
void setUrl (const QString &_rqsUrl)
 Sets this route's URL. More...
 
QString getType () const
 Returns this route's type. More...
 
QString getDescription () const
 Returns this route's description. More...
 
QString getComment () const
 Returns this route's comment. More...
 
QString getUrl () const
 Returns this route's URL. More...
 
CRoutePointaddPoint (const QString &_rqsName, const CDataPosition &_roDataPosition=CDataPosition::UNDEFINED, bool _bMinimizeLength=false)
 Add a new route (item/point) to this container. More...
 
double getLengthRL ()
 Returns the route's (rhumb-line) length. More...
 
int getInsertIndexMinLength (const CDataPosition &_roDataPosition)
 Returns the given point insertion index that minimizes the route's (rhumb-line) length. More...
 
int parseQVCT (const QDomElement &_rqDomElement)
 Retrieves this object's content from the given QVCT source (file) More...
 
int parseGPX (const QDomElement &_rqDomElement)
 Retrieves this object's content from the given GPX source (file) More...
 
void dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter, bool bOnlySelected=false) const
 Stores this object's content to the given QVCT destination (file) More...
 
void dumpGPX (QXmlStreamWriter &_rqXmlStreamWriter, bool bOnlySelected=false) const
 Stores this object's content to the given GPX 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 setVisibleCourse (bool _bVisibleCourse)
 Sets the course's 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 Attributes

QString qsType
 Route's type. More...
 
QString qsDescription
 Route's description. More...
 
QString qsComment
 Route's comment. More...
 
QString qsUrl
 Route'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] Route overlay container

This class implements the overlay container for the route overlay.

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

Definition at line 42 of file CRouteContainer.hpp.

Constructor & Destructor Documentation

◆ CRouteContainer()

CRouteContainer::CRouteContainer ( const QString &  _rqsName)

Definition at line 38 of file CRouteContainer.cpp.

◆ ~CRouteContainer()

CRouteContainer::~CRouteContainer ( )
virtual

Definition at line 51 of file CRouteContainer.cpp.

Member Function Documentation

◆ serialize()

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

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

Reimplemented from COverlayObject.

Definition at line 66 of file CRouteContainer.cpp.

◆ unserialize()

void CRouteContainer::unserialize ( QDataStream &  _rqDataStream)
virtual

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

Reimplemented from COverlayObject.

Definition at line 72 of file CRouteContainer.cpp.

◆ useOverlay()

virtual COverlay* CRouteContainer::useOverlay ( )
inlinevirtual

Returns this object's (base) overlay.

Implements COverlayObject.

Definition at line 78 of file CRouteContainer.hpp.

◆ draw()

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

Draws this object (itself or its content)

Implements COverlayObject.

Definition at line 79 of file CRouteContainer.cpp.

◆ showDetail()

void CRouteContainer::showDetail ( )
virtual

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

Implements COverlayObject.

Definition at line 101 of file CRouteContainer.cpp.

◆ showEdit()

void CRouteContainer::showEdit ( )
virtual

Displays this object's edit widget/view.

Implements COverlayObject.

Definition at line 110 of file CRouteContainer.cpp.

◆ matchScrPosition()

COverlayPoint * CRouteContainer::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 122 of file CRouteContainer.cpp.

◆ setVisibleName()

void CRouteContainer::setVisibleName ( bool  _bVisibleName)
virtual

Sets the name's (tag) visibility status.

Reimplemented from COverlayVisibility.

Definition at line 140 of file CRouteContainer.cpp.

◆ setVisiblePosition()

void CRouteContainer::setVisiblePosition ( bool  _bVisiblePosition)
virtual

Sets the position's visibility status.

Reimplemented from COverlayVisibility.

Definition at line 148 of file CRouteContainer.cpp.

◆ setVisibleRouting()

void CRouteContainer::setVisibleRouting ( bool  _bVisibleRouting)
virtual

Sets the routing's (data) visibility status.

Reimplemented from COverlayVisibility.

Definition at line 156 of file CRouteContainer.cpp.

◆ toggleVisibility()

void CRouteContainer::toggleVisibility ( )
virtual

Definition at line 164 of file CRouteContainer.cpp.

◆ setType()

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

Sets this route's type.

Definition at line 112 of file CRouteContainer.hpp.

◆ setDescription()

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

Sets this route's description.

Definition at line 114 of file CRouteContainer.hpp.

◆ setComment()

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

Sets this route's comment.

Definition at line 116 of file CRouteContainer.hpp.

◆ setUrl()

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

Sets this route's URL.

Definition at line 118 of file CRouteContainer.hpp.

◆ getType()

QString CRouteContainer::getType ( ) const
inline

Returns this route's type.

Definition at line 123 of file CRouteContainer.hpp.

◆ getDescription()

QString CRouteContainer::getDescription ( ) const
inline

Returns this route's description.

Definition at line 125 of file CRouteContainer.hpp.

◆ getComment()

QString CRouteContainer::getComment ( ) const
inline

Returns this route's comment.

Definition at line 127 of file CRouteContainer.hpp.

◆ getUrl()

QString CRouteContainer::getUrl ( ) const
inline

Returns this route's URL.

Definition at line 129 of file CRouteContainer.hpp.

◆ addPoint()

CRoutePoint * CRouteContainer::addPoint ( const QString &  _rqsName,
const CDataPosition _roDataPosition = CDataPosition::UNDEFINED,
bool  _bMinimizeLength = false 
)

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

Definition at line 188 of file CRouteContainer.cpp.

◆ getLengthRL()

double CRouteContainer::getLengthRL ( )

Returns the route's (rhumb-line) length.

Definition at line 200 of file CRouteContainer.cpp.

◆ getInsertIndexMinLength()

int CRouteContainer::getInsertIndexMinLength ( const CDataPosition _roDataPosition)

Returns the given point insertion index that minimizes the route's (rhumb-line) length.

Definition at line 216 of file CRouteContainer.cpp.

◆ parseQVCT()

int CRouteContainer::parseQVCT ( const QDomElement &  _rqDomElement)

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

Definition at line 262 of file CRouteContainer.cpp.

◆ parseGPX()

int CRouteContainer::parseGPX ( const QDomElement &  _rqDomElement)

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

Definition at line 285 of file CRouteContainer.cpp.

◆ dumpQVCT()

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

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

Definition at line 307 of file CRouteContainer.cpp.

◆ dumpGPX()

void CRouteContainer::dumpGPX ( QXmlStreamWriter &  _rqXmlStreamWriter,
bool  bOnlySelected = false 
) const

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

Definition at line 345 of file CRouteContainer.cpp.

◆ deleteSelection()

int CRouteContainer::deleteSelection ( )

Deletes selected items within this container.

Definition at line 398 of file CRouteContainer.cpp.

Member Data Documentation

◆ qsType

QString CRouteContainer::qsType
private

Route's type.

Definition at line 51 of file CRouteContainer.hpp.

◆ qsDescription

QString CRouteContainer::qsDescription
private

Route's description.

Definition at line 53 of file CRouteContainer.hpp.

◆ qsComment

QString CRouteContainer::qsComment
private

Route's comment.

Definition at line 55 of file CRouteContainer.hpp.

◆ qsUrl

QString CRouteContainer::qsUrl
private

Route's URL.

Definition at line 57 of file CRouteContainer.hpp.


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