Qwt User's Guide: QwtNullPaintDevice Class Reference

Qwt User's Guide 6.1.3

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:
[legend]

## Public Types
enum | Mode { NormalMode, PolygonPathMode, PathMode }
| Render mode. More...

## Public Member Functions
| QwtNullPaintDevice ()
| Constructor.
virtual | ~QwtNullPaintDevice ()
| Destructor.
void | setMode (Mode)
Mode | mode () const
virtual QPaintEngine * | paintEngine () const
| See QPaintDevice::paintEngine()
virtual int | metric (PaintDeviceMetric metric) const
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 &s)
| See QPaintEngine::drawTiledPixmap()
virtual void | drawImage (const QRectF &, const QImage &, const QRectF &, Qt::ImageConversionFlags)
| See QPaintEngine::drawImage()
virtual void | updateState (const QPaintEngineState &state)
| 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

enum QwtNullPaintDevice::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: drawPath() drawPixmap() drawImage() drawPolygon()
PathMode | Vector graphic primitives are mapped to a QPainterPath and are painted by drawPath. In PathMode mode only a few draw methods are called: drawPath() drawPixmap() drawImage()

## Member Function Documentation

int QwtNullPaintDevice::metric | ( | PaintDeviceMetric | deviceMetric | ) | const
| virtual

See QPaintDevice::metric()

Parameters

  deviceMetric | Type of metric

Returns
  Metric information for the given paint device metric.

See also
  sizeMetrics()

QwtNullPaintDevice::Mode QwtNullPaintDevice::mode | ( |  | ) | const

Returns
  Render mode

See also
  setMode()

void QwtNullPaintDevice::setMode | ( | Mode | mode | ) |

Set the render mode

Parameters

  mode | New mode

See also
  mode()

virtual QSize QwtNullPaintDevice::sizeMetrics | ( |  | ) | const
| protectedpure virtual

Returns
  Size needed to implement metric()

Implemented in QwtGraphic.