QWT 7.0.1
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
QwtNullPaintDevice Class Referenceabstract

A null paint device doing nothing. More...

#include <qwt_null_paintdevice.h>

Inheritance diagram for QwtNullPaintDevice:
QWT_FINAL QwtGraphic

Classes

class  PrivateData
 

Public Types

enum  Mode { NormalMode , PolygonPathMode , PathMode }
 Render mode. More...
 

Public Member Functions

 QwtNullPaintDevice ()
 Constructor.
 
virtual ~QwtNullPaintDevice ()
 Destructor.
 
void setMode (Mode)
 Set the render mode.
 
Mode mode () const
 
virtual QPaintEngine * paintEngine () const QWT_OVERRIDE
 See QPaintDevice::paintEngine()
 
virtual int metric (PaintDeviceMetric) const QWT_OVERRIDE
 See QPaintDevice::metric()
 
virtual void drawRects (const QRect *, int)
 See QPaintEngine::drawRects()
 
virtual void drawRects (const QRectF *, int)
 See QPaintEngine::drawRects()
 
virtual void drawLines (const QLine *, int)
 See QPaintEngine::drawLines()
 
virtual void drawLines (const QLineF *, int)
 See QPaintEngine::drawLines()
 
virtual void drawEllipse (const QRectF &)
 See QPaintEngine::drawEllipse()
 
virtual void drawEllipse (const QRect &)
 See QPaintEngine::drawEllipse()
 
virtual void drawPath (const QPainterPath &)
 See QPaintEngine::drawPath()
 
virtual void drawPoints (const QPointF *, int)
 See QPaintEngine::drawPoints()
 
virtual void drawPoints (const QPoint *, int)
 See QPaintEngine::drawPoints()
 
virtual void drawPolygon (const QPointF *, int, QPaintEngine::PolygonDrawMode)
 See QPaintEngine::drawPolygon()
 
virtual void drawPolygon (const QPoint *, int, QPaintEngine::PolygonDrawMode)
 See QPaintEngine::drawPolygon()
 
virtual void drawPixmap (const QRectF &, const QPixmap &, const QRectF &)
 See QPaintEngine::drawPixmap()
 
virtual void drawTextItem (const QPointF &, const QTextItem &)
 See QPaintEngine::drawTextItem()
 
virtual void drawTiledPixmap (const QRectF &, const QPixmap &, const QPointF &)
 See QPaintEngine::drawTiledPixmap()
 
virtual void drawImage (const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)
 See QPaintEngine::drawImage()
 
virtual void updateState (const QPaintEngineState &)
 See QPaintEngine::updateState()
 

Protected Member Functions

virtual QSize sizeMetrics () const =0
 

Detailed Description

A null paint device doing nothing.

Sometimes important layout/rendering geometries are not available or changeable from the public Qt class interface. ( f.e hidden in the style implementation ).

QwtNullPaintDevice can be used to manipulate or filter out this information by analyzing the stream of paint primitives.

F.e. QwtNullPaintDevice is used by QwtPlotCanvas to identify styled backgrounds with rounded corners.

Member Enumeration Documentation

◆ Mode

Render mode.

See also
setMode(), mode()
Enumerator
NormalMode 

All vector graphic primitives are painted by the corresponding draw methods.

PolygonPathMode 

Vector graphic primitives ( beside polygons ) are mapped to a QPainterPath and are painted by drawPath.

In PathMode mode only a few draw methods are called:

PathMode 

Vector graphic primitives are mapped to a QPainterPath and are painted by drawPath.

In PathMode mode only a few draw methods are called:

Member Function Documentation

◆ drawEllipse() [1/2]

void QwtNullPaintDevice::drawEllipse ( const QRect &  rect)
virtual

See QPaintEngine::drawEllipse()

Reimplemented in QWT_FINAL.

◆ drawEllipse() [2/2]

void QwtNullPaintDevice::drawEllipse ( const QRectF &  rect)
virtual

See QPaintEngine::drawEllipse()

Reimplemented in QWT_FINAL.

◆ drawImage()

void QwtNullPaintDevice::drawImage ( const QRectF &  rect,
const QImage &  image,
const QRectF &  subRect,
Qt::ImageConversionFlags  flags 
)
virtual

See QPaintEngine::drawImage()

Reimplemented in QwtGraphic, and QWT_FINAL.

◆ drawLines() [1/2]

void QwtNullPaintDevice::drawLines ( const QLine *  lines,
int  lineCount 
)
virtual

See QPaintEngine::drawLines()

Reimplemented in QWT_FINAL.

◆ drawLines() [2/2]

void QwtNullPaintDevice::drawLines ( const QLineF *  lines,
int  lineCount 
)
virtual

See QPaintEngine::drawLines()

Reimplemented in QWT_FINAL.

◆ drawPath()

void QwtNullPaintDevice::drawPath ( const QPainterPath &  path)
virtual

See QPaintEngine::drawPath()

Reimplemented in QwtGraphic, QWT_FINAL, and QWT_FINAL.

◆ drawPixmap()

void QwtNullPaintDevice::drawPixmap ( const QRectF &  rect,
const QPixmap &  pm,
const QRectF &  subRect 
)
virtual

See QPaintEngine::drawPixmap()

Reimplemented in QwtGraphic, and QWT_FINAL.

◆ drawPoints() [1/2]

void QwtNullPaintDevice::drawPoints ( const QPoint *  points,
int  pointCount 
)
virtual

See QPaintEngine::drawPoints()

Reimplemented in QWT_FINAL.

◆ drawPoints() [2/2]

void QwtNullPaintDevice::drawPoints ( const QPointF *  points,
int  pointCount 
)
virtual

See QPaintEngine::drawPoints()

Reimplemented in QWT_FINAL.

◆ drawRects() [1/2]

void QwtNullPaintDevice::drawRects ( const QRect *  rects,
int  rectCount 
)
virtual

See QPaintEngine::drawRects()

Reimplemented in QWT_FINAL, and QWT_FINAL.

◆ drawRects() [2/2]

void QwtNullPaintDevice::drawRects ( const QRectF *  rects,
int  rectCount 
)
virtual

See QPaintEngine::drawRects()

Reimplemented in QWT_FINAL, and QWT_FINAL.

◆ drawTextItem()

void QwtNullPaintDevice::drawTextItem ( const QPointF &  pos,
const QTextItem &  textItem 
)
virtual

See QPaintEngine::drawTextItem()

Reimplemented in QWT_FINAL.

◆ drawTiledPixmap()

void QwtNullPaintDevice::drawTiledPixmap ( const QRectF &  rect,
const QPixmap &  pixmap,
const QPointF &  subRect 
)
virtual

See QPaintEngine::drawTiledPixmap()

Reimplemented in QWT_FINAL.

◆ metric()

int QwtNullPaintDevice::metric ( PaintDeviceMetric  deviceMetric) const
virtual

See QPaintDevice::metric()

Parameters
deviceMetricType of metric
Returns
Metric information for the given paint device metric.
See also
sizeMetrics()

◆ mode()

QwtNullPaintDevice::Mode QwtNullPaintDevice::mode ( ) const
Returns
Render mode
See also
setMode()

◆ setMode()

void QwtNullPaintDevice::setMode ( Mode  mode)

Set the render mode.

Parameters
modeNew mode
See also
mode()

◆ sizeMetrics()

virtual QSize QwtNullPaintDevice::sizeMetrics ( ) const
protectedpure virtual
Returns
Size needed to implement metric()

Implemented in QwtGraphic, and QWT_FINAL.

◆ updateState()

void QwtNullPaintDevice::updateState ( const QPaintEngineState &  state)
virtual

See QPaintEngine::updateState()

Reimplemented in QwtGraphic, QWT_FINAL, and QWT_FINAL.


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