Qt Virtual Chart Table (QVCT)
COverlay Class Referenceabstract

Generic overlay. More...

#include <overlays/COverlay.hpp>

Inheritance diagram for COverlay:
COverlayBase COverlayBaseTree CPointerOverlay CDeviceOverlay CLandmarkOverlay CRouteOverlay CTrackOverlay CVesselOverlay

Public Member Functions

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...
 
virtual void drawContent (const CChart *_poChart, QPainter *_pqPainter) const =0
 Draws this overlay's content. More...
 
virtual void showDetail (const QTreeWidgetItem *_pqTreeWidgetItem) const =0
 Displays the given overlay object's details (in the appropriate widget/view) More...
 
virtual void setPosition (const QTreeWidgetItem *_pqTreeWidgetItem) const =0
 Centers the chart on the given overlay object's position. More...
 
virtual COverlayPointmatchScrPosition (const CChart *_poChart, const QPointF &_rqPointFScrPosition) const =0
 Returns the overlay's point that (first) matches the given screen position (0 if none is found) 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...
 

Protected Member Functions

 COverlay (const QString &_rqsName)
 
virtual ~COverlay ()
 

Protected Attributes

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

Generic overlay.

This class defines the generic representation of a chart overlay. A chart overlay is a set of items that may be displayed on top of a chart, such as the mouse pointer, landmarks, routes, tracks, vessels, etc. This class already implements the logic that allows to cache the necessary QPixmap used to render the overlay graphical content on the currently displayed chart and avoid to "re-render" it each time an another overlay is modified and requires the CChart widget to be redrawn.

See also
CChart, CChartTable
Author
Cedric Dufour http://cedric.dufour.name

Definition at line 44 of file COverlay.hpp.

Constructor & Destructor Documentation

◆ COverlay()

COverlay::COverlay ( const QString &  _rqsName)
protected

Definition at line 36 of file COverlay.cpp.

◆ ~COverlay()

virtual COverlay::~COverlay ( )
inlineprotectedvirtual

Definition at line 103 of file COverlay.hpp.

Member Function Documentation

◆ setVisible()

void COverlay::setVisible ( bool  _bVisible)
inline

Sets this overlay items' global visibility status.

Definition at line 113 of file COverlay.hpp.

◆ forceRedraw()

void COverlay::forceRedraw ( )
inline

Forces this overlay's rendering (not matter its cache content)

Definition at line 115 of file COverlay.hpp.

◆ isVisible()

bool COverlay::isVisible ( ) const
inline

Returns this overlay items' global visibility status.

Definition at line 120 of file COverlay.hpp.

◆ isRedrawForced()

bool COverlay::isRedrawForced ( ) const
inline

Definition at line 121 of file COverlay.hpp.

◆ getFont()

const QFont& COverlay::getFont ( ) const
inline

Definition at line 122 of file COverlay.hpp.

◆ getBrushText()

const QBrush& COverlay::getBrushText ( ) const
inline

Definition at line 123 of file COverlay.hpp.

◆ getPenText()

const QPen& COverlay::getPenText ( ) const
inline

Definition at line 124 of file COverlay.hpp.

◆ getBrushMarker()

const QBrush& COverlay::getBrushMarker ( ) const
inline

Definition at line 125 of file COverlay.hpp.

◆ getPenMarker()

const QPen& COverlay::getPenMarker ( ) const
inline

Definition at line 126 of file COverlay.hpp.

◆ getBrushMarkerSelected()

const QBrush& COverlay::getBrushMarkerSelected ( ) const
inline

Definition at line 127 of file COverlay.hpp.

◆ getPenMarkerSelected()

const QPen& COverlay::getPenMarkerSelected ( ) const
inline

Definition at line 128 of file COverlay.hpp.

◆ getPenLine()

const QPen& COverlay::getPenLine ( ) const
inline

Definition at line 129 of file COverlay.hpp.

◆ getPenVector()

const QPen& COverlay::getPenVector ( ) const
inline

Definition at line 130 of file COverlay.hpp.

◆ draw()

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

Draws this overlay.

Definition at line 86 of file COverlay.cpp.

◆ drawContent()

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

Draws this overlay's content.

Implemented in CVesselOverlay, CTrackOverlay, CRouteOverlay, CPointerOverlay, CLandmarkOverlay, and CDeviceOverlay.

◆ showDetail()

virtual void COverlay::showDetail ( const QTreeWidgetItem *  _pqTreeWidgetItem) const
pure virtual

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

Implemented in CVesselOverlay, CTrackOverlay, CRouteOverlay, CPointerOverlay, CLandmarkOverlay, and CDeviceOverlay.

◆ setPosition()

virtual void COverlay::setPosition ( const QTreeWidgetItem *  _pqTreeWidgetItem) const
pure virtual

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

Implemented in CVesselOverlay, CTrackOverlay, CRouteOverlay, CPointerOverlay, CLandmarkOverlay, and CDeviceOverlay.

◆ matchScrPosition()

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

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

Implemented in CVesselOverlay, CTrackOverlay, CRouteOverlay, CPointerOverlay, CLandmarkOverlay, and CDeviceOverlay.

◆ newChildName()

QString COverlay::newChildName ( const QString &  _rqsName,
int  __iZeroPrefix = 0,
bool  __bForceSuffix = false 
) const

Returns a valid name for a new sibling of this object.

This method checks and returns a valid name for a new sibling of this object, such as no duplicate is created. If the given name matches an existing sibling, it is automatically suffixed with a number, prefixed with the given quantity of "0" (e.g. "Object(01)")

Definition at line 123 of file COverlay.cpp.

Member Data Documentation

◆ qsName

QString COverlay::qsName
protected

Overlay name.

Definition at line 52 of file COverlay.hpp.

◆ bVisible

bool COverlay::bVisible
protected

Overlay items' global visibility status.

See also
setVisible(), isVisible()

Definition at line 56 of file COverlay.hpp.

◆ qPixmapBuffer

QPixmap COverlay::qPixmapBuffer
protected

Pixmap buffer used to render and cache this overlay's graphical content.

Definition at line 59 of file COverlay.hpp.

◆ poChartPixmap

const CChart* COverlay::poChartPixmap
protected

Chart for which the last rendering was achieved.

Definition at line 61 of file COverlay.hpp.

◆ qPointFDatPositionPixmap

QPointF COverlay::qPointFDatPositionPixmap
protected

Chart position at which the last rendering was achieved.

Definition at line 63 of file COverlay.hpp.

◆ fdZoomPixmap

double COverlay::fdZoomPixmap
protected

Zoom factor at which the last rendering was achieved.

Definition at line 65 of file COverlay.hpp.

◆ bForceRedraw

bool COverlay::bForceRedraw
protected

Forces this overlay's rendering (not matter its cache content)

Definition at line 67 of file COverlay.hpp.

◆ qFont

QFont COverlay::qFont
protected

QFont used to draw text on this overlay.

Definition at line 70 of file COverlay.hpp.

◆ qBrushText

QBrush COverlay::qBrushText
protected

QBrush used to draw text on this overlay.

See also
COverlayPoint::drawTag(), COverlayPoint::drawLine()

Definition at line 73 of file COverlay.hpp.

◆ qPenText

QPen COverlay::qPenText
protected

QPen used to draw text on this overlay.

See also
COverlayPoint::drawTag(), COverlayPoint::drawLine()

Definition at line 76 of file COverlay.hpp.

◆ qBrushMarker

QBrush COverlay::qBrushMarker
protected

QBrush used to draw markers on this overlay.

See also
COverlayPoint::drawMarker()

Definition at line 79 of file COverlay.hpp.

◆ qPenMarker

QPen COverlay::qPenMarker
protected

QPen used to draw markers on this overlay.

See also
COverlayPoint::drawMarker()

Definition at line 82 of file COverlay.hpp.

◆ qBrushMarkerSelected

QBrush COverlay::qBrushMarkerSelected
protected

QBrush used to identify selected markers on this overlay.

See also
COverlayPoint::drawMarker()

Definition at line 85 of file COverlay.hpp.

◆ qPenMarkerSelected

QPen COverlay::qPenMarkerSelected
protected

QPen used to identify selected markers on this overlay.

See also
COverlayPoint::drawMarker()

Definition at line 88 of file COverlay.hpp.

◆ qPenLine

QPen COverlay::qPenLine
protected

QPen used to draw lines on this overlay.

See also
COverlayPoint::drawLine()

Definition at line 91 of file COverlay.hpp.

◆ qPenVector

QPen COverlay::qPenVector
protected

QPen used to draw vectors on this overlay.

See also
COverlayCourse::drawVector()

Definition at line 94 of file COverlay.hpp.


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