Qt Virtual Chart Table (QVCT)
CDeviceOverlay Class Reference

[UI] Device overlay container More...

#include <overlays/device/CDeviceOverlay.hpp>

Inheritance diagram for CDeviceOverlay:
COverlayBaseTree COverlay

Public Types

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

Public Member Functions

 CDeviceOverlay (QWidget *_pqParent=0)
 
virtual ~CDeviceOverlay ()
 
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...
 
CDevicepickDevice (const QString &_rqsName)
 Returns the device matching the given name (0 if none is found) More...
 
int deleteSelection ()
 Deletes selected devices from this overlay. More...
 
void clear ()
 Clear the entire content of this overlay. More...
 
CDeviceload (const QString &_rqsFilename, bool _bSilent=false)
 Load this object's content from the given file and returns the last loaded device (0 if none) More...
 
void save (const QString &_rqsFilename, CDevice *_poDevice=0, bool _bApplicationDump=false) const
 Save this object's content (device) to the given file (all selected items if no device is given) More...
 
int parseQVCT (const QDomElement &_rqDomElement, CDevice **_ppoDevice=0)
 Retrieves this object's content from the given QVCT source (file) More...
 
void dumpQVCT (QXmlStreamWriter &_rqXmlStreamWriter, CDevice *_poDevice=0, bool _bApplicationDump=false) const
 Stores this object's content to the given QVCT 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...
 

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] Device overlay container

This class implements the (base) overlay corresponding to device overlay. The device overlay is not exactly an overlay since it is not meant to be drawn on top of the displayed chart. On the other hand, having devices available for inspection/configuration in the tree view (dock widget) is quite handy.

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

Definition at line 55 of file CDeviceOverlay.hpp.

Member Enumeration Documentation

◆ EColumn

Implemented tree-widget columns.

Enumerator
NAME 

Device name.

SELECT 

Device selection status.

Definition at line 64 of file CDeviceOverlay.hpp.

Constructor & Destructor Documentation

◆ CDeviceOverlay()

CDeviceOverlay::CDeviceOverlay ( QWidget *  _pqParent = 0)

Definition at line 44 of file CDeviceOverlay.cpp.

◆ ~CDeviceOverlay()

CDeviceOverlay::~CDeviceOverlay ( )
virtual

Definition at line 62 of file CDeviceOverlay.cpp.

Member Function Documentation

◆ drawContent()

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

Draws this overlay's content.

Implements COverlay.

Definition at line 84 of file CDeviceOverlay.hpp.

◆ showDetail()

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

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

Implements COverlay.

Definition at line 73 of file CDeviceOverlay.cpp.

◆ setPosition()

virtual void CDeviceOverlay::setPosition ( const QTreeWidgetItem *  _pqTreeWidgetItem) const
inlinevirtual

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

Implements COverlay.

Definition at line 86 of file CDeviceOverlay.hpp.

◆ matchScrPosition()

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

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

Implements COverlay.

Definition at line 87 of file CDeviceOverlay.hpp.

◆ onChange()

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

Handles item (content) changes in the underlying QTreeWidget.

Implements COverlayBaseTree.

Definition at line 100 of file CDeviceOverlay.cpp.

◆ pickDevice()

CDevice * CDeviceOverlay::pickDevice ( const QString &  _rqsName)

Returns the device matching the given name (0 if none is found)

Definition at line 132 of file CDeviceOverlay.cpp.

◆ deleteSelection()

int CDeviceOverlay::deleteSelection ( )

Deletes selected devices from this overlay.

Definition at line 143 of file CDeviceOverlay.cpp.

◆ clear()

void CDeviceOverlay::clear ( )

Clear the entire content of this overlay.

Definition at line 159 of file CDeviceOverlay.cpp.

◆ load()

CDevice * CDeviceOverlay::load ( const QString &  _rqsFilename,
bool  _bSilent = false 
)

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

Definition at line 169 of file CDeviceOverlay.cpp.

◆ save()

void CDeviceOverlay::save ( const QString &  _rqsFilename,
CDevice _poDevice = 0,
bool  _bApplicationDump = false 
) const

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

Definition at line 241 of file CDeviceOverlay.cpp.

◆ parseQVCT()

int CDeviceOverlay::parseQVCT ( const QDomElement &  _rqDomElement,
CDevice **  _ppoDevice = 0 
)

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

Definition at line 214 of file CDeviceOverlay.cpp.

◆ dumpQVCT()

void CDeviceOverlay::dumpQVCT ( QXmlStreamWriter &  _rqXmlStreamWriter,
CDevice _poDevice = 0,
bool  _bApplicationDump = false 
) const

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

Definition at line 274 of file CDeviceOverlay.cpp.


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