Qt Virtual Chart Table (QVCT)
CRouteOverlay Class Reference

[UI] Route overlay container More...

#include <overlays/route/CRouteOverlay.hpp>

Inheritance diagram for CRouteOverlay:
COverlayBaseTree COverlay

Public Types

enum  EColumn { NAME = 0 , VISIBLE = 1 , SELECT = 2 }
 Implemented tree-widget columns. More...
 

Public Member Functions

 CRouteOverlay (QWidget *_pqParent=0)
 
virtual ~CRouteOverlay ()
 
virtual void drawContent (const CChart *_poChart, QPainter *_pqPainter) const
 Draws this overlay's content. More...
 
virtual void showDetail (const QTreeWidgetItem *_pqTreeWidgetItem) const
 Displays the given overlay object's details (in the appropriate widget/view) More...
 
virtual void setPosition (const QTreeWidgetItem *_pqTreeWidgetItem) const
 Centers the chart on the given overlay object's position. More...
 
virtual COverlayPointmatchScrPosition (const CChart *_poChart, const QPointF &_rqPointFScrPosition) const
 Returns the overlay's point that (first) matches the given screen position (0 if none is found) More...
 
virtual void onChange (QTreeWidgetItem *_pqTreeWidgetItem, int __iColumn)
 Handles item (content) changes in the underlying QTreeWidget. More...
 
void importSettings ()
 Imports settings from the application's global settings. More...
 
CRouteContaineraddContainer (const QString &_rqsName)
 Add a new route (container) to this overlay. More...
 
CRouteContainerpickContainer ()
 Pick (select) a route (container) among the available ones (0 if none is selected) More...
 
int deleteSelection ()
 Deletes selected items within this overlay's containers. More...
 
void clear ()
 Clear the entire content of this overlay. More...
 
CRouteContainerload (const QString &_rqsFilename)
 Load this object's content from the given file and returns the last loaded container (0 if none) More...
 
void save (const QString &_rqsFilename, CRouteContainer *_poRouteContainer=0) const
 Save this object's content (container) to the given file (all selected items if no container is given) More...
 
int parseQVCT (const QDomElement &_rqDomElement, CRouteContainer **_ppoRouteContainer=0)
 Retrieves this object's content from the given QVCT source (file) More...
 
int parseGPX (const QDomElement &_rqDomElement, CRouteContainer **_ppoRouteContainer=0)
 Retrieves this object's content from the given GPX source (file) More...
 
void dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter, CRouteContainer *_poRouteContainer=0, bool _bProjectDump=false) const
 Stores this object's content to the given QVCT destination (file) More...
 
void dumpGPX (QXmlStreamWriter &_rqXmlStreamWriter, CRouteContainer *_poRouteContainer=0) const
 Stores this object's content to the given GPX destination (file) More...
 
- Public Member Functions inherited from COverlay
void setVisible (bool _bVisible)
 Sets this overlay items' global visibility status. More...
 
void forceRedraw ()
 Forces this overlay's rendering (not matter its cache content) More...
 
bool isVisible () const
 Returns this overlay items' global visibility status. More...
 
bool isRedrawForced () const
 
const QFont & getFont () const
 
const QBrush & getBrushText () const
 
const QPen & getPenText () const
 
const QBrush & getBrushMarker () const
 
const QPen & getPenMarker () const
 
const QBrush & getBrushMarkerSelected () const
 
const QPen & getPenMarkerSelected () const
 
const QPen & getPenLine () const
 
const QPen & getPenVector () const
 
void draw (const CChart *_poChart, QPainter *_pqPainter)
 Draws this overlay. More...
 
QString newChildName (const QString &_rqsName, int __iZeroPrefix=0, bool __bForceSuffix=false) const
 Returns a valid name for a new sibling of this object. More...
 

Private Member Functions

virtual QStringList mimeTypes () const
 
virtual QMimeData * mimeData (const QList< QTreeWidgetItem * > _qListTreeWidgetItems) const
 
virtual bool dropMimeData (QTreeWidgetItem *_pqTreeWidgetItem, int _iIndex, const QMimeData *_pqMimeData, Qt::DropAction eAction)
 
virtual void dropEvent (QDropEvent *_pqDropEvent)
 

Additional Inherited Members

- Protected Member Functions inherited from COverlayBaseTree
 COverlayBaseTree (QWidget *_pqParent, const QString &_rqsName)
 
virtual ~COverlayBaseTree ()
 
void destroy ()
 Prepare the underlying QTreeWidget for destruction. More...
 
- Protected Member Functions inherited from COverlay
 COverlay (const QString &_rqsName)
 
virtual ~COverlay ()
 
- Protected Attributes inherited from COverlay
QString qsName
 Overlay name. More...
 
bool bVisible
 Overlay items' global visibility status. More...
 
QPixmap qPixmapBuffer
 Pixmap buffer used to render and cache this overlay's graphical content. More...
 
const CChartpoChartPixmap
 Chart for which the last rendering was achieved. More...
 
QPointF qPointFDatPositionPixmap
 Chart position at which the last rendering was achieved. More...
 
double fdZoomPixmap
 Zoom factor at which the last rendering was achieved. More...
 
bool bForceRedraw
 Forces this overlay's rendering (not matter its cache content) More...
 
QFont qFont
 QFont used to draw text on this overlay. More...
 
QBrush qBrushText
 QBrush used to draw text on this overlay. More...
 
QPen qPenText
 QPen used to draw text on this overlay. More...
 
QBrush qBrushMarker
 QBrush used to draw markers on this overlay. More...
 
QPen qPenMarker
 QPen used to draw markers on this overlay. More...
 
QBrush qBrushMarkerSelected
 QBrush used to identify selected markers on this overlay. More...
 
QPen qPenMarkerSelected
 QPen used to identify selected markers on this overlay. More...
 
QPen qPenLine
 QPen used to draw lines on this overlay. More...
 
QPen qPenVector
 QPen used to draw vectors on this overlay. More...
 

Detailed Description

[UI] Route overlay container

This class implements the (base) overlay corresponding to route overlay.

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

Definition at line 51 of file CRouteOverlay.hpp.

Member Enumeration Documentation

◆ EColumn

Implemented tree-widget columns.

Enumerator
NAME 

Route name.

VISIBLE 

Route visibility status.

SELECT 

Route selection status.

Definition at line 60 of file CRouteOverlay.hpp.

Constructor & Destructor Documentation

◆ CRouteOverlay()

CRouteOverlay::CRouteOverlay ( QWidget *  _pqParent = 0)

Definition at line 46 of file CRouteOverlay.cpp.

◆ ~CRouteOverlay()

CRouteOverlay::~CRouteOverlay ( )
virtual

Definition at line 71 of file CRouteOverlay.cpp.

Member Function Documentation

◆ mimeTypes()

QStringList CRouteOverlay::mimeTypes ( ) const
privatevirtual

Definition at line 82 of file CRouteOverlay.cpp.

◆ mimeData()

QMimeData * CRouteOverlay::mimeData ( const QList< QTreeWidgetItem * >  _qListTreeWidgetItems) const
privatevirtual

Definition at line 88 of file CRouteOverlay.cpp.

◆ dropMimeData()

bool CRouteOverlay::dropMimeData ( QTreeWidgetItem *  _pqTreeWidgetItem,
int  _iIndex,
const QMimeData *  _pqMimeData,
Qt::DropAction  eAction 
)
privatevirtual

Definition at line 104 of file CRouteOverlay.cpp.

◆ dropEvent()

void CRouteOverlay::dropEvent ( QDropEvent *  _pqDropEvent)
privatevirtual

Definition at line 120 of file CRouteOverlay.cpp.

◆ drawContent()

void CRouteOverlay::drawContent ( const CChart _poChart,
QPainter *  _pqPainter 
) const
virtual

Draws this overlay's content.

Implements COverlay.

Definition at line 131 of file CRouteOverlay.cpp.

◆ showDetail()

void CRouteOverlay::showDetail ( const QTreeWidgetItem *  _pqTreeWidgetItem) const
virtual

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

Implements COverlay.

Definition at line 139 of file CRouteOverlay.cpp.

◆ setPosition()

void CRouteOverlay::setPosition ( const QTreeWidgetItem *  _pqTreeWidgetItem) const
virtual

Centers the chart on the given overlay object's position.

Implements COverlay.

Definition at line 170 of file CRouteOverlay.cpp.

◆ matchScrPosition()

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

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

Implements COverlay.

Definition at line 198 of file CRouteOverlay.cpp.

◆ onChange()

void CRouteOverlay::onChange ( QTreeWidgetItem *  _pqTreeWidgetItem,
int  __iColumn 
)
virtual

Handles item (content) changes in the underlying QTreeWidget.

Implements COverlayBaseTree.

Definition at line 216 of file CRouteOverlay.cpp.

◆ importSettings()

void CRouteOverlay::importSettings ( )

Imports settings from the application's global settings.

Definition at line 295 of file CRouteOverlay.cpp.

◆ addContainer()

CRouteContainer * CRouteOverlay::addContainer ( const QString &  _rqsName)

Add a new route (container) to this overlay.

Definition at line 307 of file CRouteOverlay.cpp.

◆ pickContainer()

CRouteContainer * CRouteOverlay::pickContainer ( )

Pick (select) a route (container) among the available ones (0 if none is selected)

This method returns a container according to the following logic:

  • if no container exists, a new one is automatically created (and returned)
  • if a single container exists, it is returned
  • if multiple containers exist, the user is asked to pick (select) one

Definition at line 315 of file CRouteOverlay.cpp.

◆ deleteSelection()

int CRouteOverlay::deleteSelection ( )

Deletes selected items within this overlay's containers.

Definition at line 328 of file CRouteOverlay.cpp.

◆ clear()

void CRouteOverlay::clear ( )

Clear the entire content of this overlay.

Definition at line 336 of file CRouteOverlay.cpp.

◆ load()

CRouteContainer * CRouteOverlay::load ( const QString &  _rqsFilename)

Load this object's content from the given file and returns the last loaded container (0 if none)

Definition at line 346 of file CRouteOverlay.cpp.

◆ save()

void CRouteOverlay::save ( const QString &  _rqsFilename,
CRouteContainer _poRouteContainer = 0 
) const

Save this object's content (container) to the given file (all selected items if no container is given)

Definition at line 432 of file CRouteOverlay.cpp.

◆ parseQVCT()

int CRouteOverlay::parseQVCT ( const QDomElement &  _rqDomElement,
CRouteContainer **  _ppoRouteContainer = 0 
)

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

Definition at line 392 of file CRouteOverlay.cpp.

◆ parseGPX()

int CRouteOverlay::parseGPX ( const QDomElement &  _rqDomElement,
CRouteContainer **  _ppoRouteContainer = 0 
)

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

Definition at line 412 of file CRouteOverlay.cpp.

◆ dumpQVCT()

void CRouteOverlay::dumpQVCT ( QXmlStreamWriter &  _rqXmlStreamWriter,
CRouteContainer _poRouteContainer = 0,
bool  _bProjectDump = false 
) const

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

Definition at line 466 of file CRouteOverlay.cpp.

◆ dumpGPX()

void CRouteOverlay::dumpGPX ( QXmlStreamWriter &  _rqXmlStreamWriter,
CRouteContainer _poRouteContainer = 0 
) const

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

Definition at line 485 of file CRouteOverlay.cpp.


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