Qwt User's Guide: qwt_null_paintdevice.h Source File

Qwt User's Guide 6.1.3

- Main Page
- Classes

qwt_null_paintdevice.h
1 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
2 * Qwt Widget Library
3 * Copyright (C) 1997 Josef Wilgen
4 * Copyright (C) 2002 Uwe Rathmann
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the Qwt License, Version 1.0
8 *****************************************************************************/
9
10 #ifndef QWT_NULL_PAINT_DEVICE_H
11 #define QWT_NULL_PAINT_DEVICE_H 1
12
13 #include "qwt_global.h"
14 #include <qpaintdevice.h>
15 #include <qpaintengine.h>
16
31 class QWT_EXPORT QwtNullPaintDevice: public QPaintDevice
32 {
33 public:
39 enum Mode
40 {
45 NormalMode,
46
57 PolygonPathMode,
58
68 PathMode
69 };
70
71 QwtNullPaintDevice();
72 virtual ~QwtNullPaintDevice();
73
74 void setMode( Mode );
75 Mode mode() const;
76
77 virtual QPaintEngine *paintEngine() const;
78
79 virtual int metric( PaintDeviceMetric metric ) const;
80
81 virtual void drawRects(const QRect *, int );
82 virtual void drawRects(const QRectF *, int );
83
84 virtual void drawLines(const QLine *, int );
85 virtual void drawLines(const QLineF *, int );
86
87 virtual void drawEllipse(const QRectF &);
88 virtual void drawEllipse(const QRect &);
89
90 virtual void drawPath(const QPainterPath &);
91
92 virtual void drawPoints(const QPointF *, int );
93 virtual void drawPoints(const QPoint *, int );
94
95 virtual void drawPolygon(
96 const QPointF *, int , QPaintEngine::PolygonDrawMode );
97
98 virtual void drawPolygon(
99 const QPoint *, int , QPaintEngine::PolygonDrawMode );
100
101 virtual void drawPixmap(const QRectF &,
102 const QPixmap &, const QRectF &);
103
104 virtual void drawTextItem(const QPointF &, const QTextItem &);
105
106 virtual void drawTiledPixmap(const QRectF &,
107 const QPixmap &, const QPointF &s);
108
109 virtual void drawImage(const QRectF &,
110 const QImage &, const QRectF &, Qt::ImageConversionFlags );
111
112 virtual void updateState( const QPaintEngineState &state );
113
114 protected:
116 virtual QSize sizeMetrics() const = 0;
117
118 private:
119 class PaintEngine;
120 PaintEngine *d_engine;
121
122 class PrivateData;
123 PrivateData *d_data;
124 };
125
126 #endif
QwtNullPaintDevice::NormalMode
Definition: qwt_null_paintdevice.h:45
QwtNullPaintDevice::PolygonPathMode
Definition: qwt_null_paintdevice.h:57
QwtNullPaintDevice::Mode
Mode
Render mode.
Definition: qwt_null_paintdevice.h:39
QwtNullPaintDevice
A null paint device doing nothing.
Definition: qwt_null_paintdevice.h:31