22 #include <QTreeWidgetItem>
41 , bForceRedraw( true )
44 qFont.setPixelSize( 12 );
46 qBrushText.setColor( QColor( 255, 255, 255, 160 ) );
47 qPenText.setColor( QColor( 0, 0, 0, 192 ) );
50 qPenText.setCapStyle( Qt::RoundCap );
62 qPenLine.setColor( QColor( 0, 0, 0, 192 ) );
65 qPenLine.setCapStyle( Qt::RoundCap );
73 __qColor.setAlpha( 255 );
92 QSize __qSizePixmap = _poChart->
getDrawArea().toRect().size();
94 double __fdZoomPixmap = _poChart->
getZoom();
113 __qPainter.setRenderHints( QPainter::Antialiasing | QPainter::TextAntialiasing );
114 __qPainter.setFont(
qFont );
131 if( __bForceSuffix || __iSuffix ) __qsName +=
"("+QString::number( __iSuffix+1 ).prepend( QString( __iZeroPrefix,
'0' ) ).right( __iZeroPrefix+1 )+
")";
133 for(
int __i = QTreeWidgetItem::childCount()-1; __i >= 0; __i-- )
135 if( __qsName == ((
COverlayObject*)QTreeWidgetItem::child( __i ))->getName() )
double getZoom() const
Returns the current zoom factor.
QRectF getDrawArea() const
Returns the viewport draw area.
QPointF getDatPosition() const
Returns the current (center) position (dataset coordinates) of the chart.
const CChart * poChartPixmap
Chart for which the last rendering was achieved.
QPixmap qPixmapBuffer
Pixmap buffer used to render and cache this overlay's graphical content.
bool bForceRedraw
Forces this overlay's rendering (not matter its cache content)
virtual void drawContent(const CChart *_poChart, QPainter *_pqPainter) const =0
Draws this overlay's content.
QString newChildName(const QString &_rqsName, int __iZeroPrefix=0, bool __bForceSuffix=false) const
Returns a valid name for a new sibling of this object.
QPen qPenLine
QPen used to draw lines on this overlay.
QPen qPenVector
QPen used to draw vectors on this overlay.
QPen qPenText
QPen used to draw text on this overlay.
void draw(const CChart *_poChart, QPainter *_pqPainter)
Draws this overlay.
bool bVisible
Overlay items' global visibility status.
QPen qPenMarkerSelected
QPen used to identify selected markers on this overlay.
QFont qFont
QFont used to draw text on this overlay.
QBrush qBrushMarker
QBrush used to draw markers on this overlay.
COverlay(const QString &_rqsName)
QBrush qBrushMarkerSelected
QBrush used to identify selected markers on this overlay.
QPointF qPointFDatPositionPixmap
Chart position at which the last rendering was achieved.
double fdZoomPixmap
Zoom factor at which the last rendering was achieved.
QBrush qBrushText
QBrush used to draw text on this overlay.
QPen qPenMarker
QPen used to draw markers on this overlay.
QColor getColorSelected()
[Color] Returns the selected objects base color
static CSettings * useSettings()