Qwt User's Guide 6.3.0
Loading...
Searching...
No Matches
qwt_null_paintdevice.h
1/******************************************************************************
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
12
13#include "qwt_global.h"
14
15#include <qpaintdevice.h>
16#include <qpaintengine.h>
17
32class QWT_EXPORT QwtNullPaintDevice : public QPaintDevice
33{
34 public:
40 enum Mode
41 {
47
59
69 PathMode
70 };
71
73 virtual ~QwtNullPaintDevice();
74
75 void setMode( Mode );
76 Mode mode() const;
77
78 virtual QPaintEngine* paintEngine() const QWT_OVERRIDE;
79
80 virtual int metric( PaintDeviceMetric ) const QWT_OVERRIDE;
81
82 virtual void drawRects(const QRect*, int );
83 virtual void drawRects(const QRectF*, int );
84
85 virtual void drawLines(const QLine*, int );
86 virtual void drawLines(const QLineF*, int );
87
88 virtual void drawEllipse(const QRectF&);
89 virtual void drawEllipse(const QRect&);
90
91 virtual void drawPath(const QPainterPath&);
92
93 virtual void drawPoints(const QPointF*, int );
94 virtual void drawPoints(const QPoint*, int );
95
96 virtual void drawPolygon( const QPointF*, int,
97 QPaintEngine::PolygonDrawMode );
98
99 virtual void drawPolygon( const QPoint*, int,
100 QPaintEngine::PolygonDrawMode );
101
102 virtual void drawPixmap(const QRectF&,
103 const QPixmap&, const QRectF&);
104
105 virtual void drawTextItem(const QPointF&, const QTextItem&);
106
107 virtual void drawTiledPixmap(const QRectF&,
108 const QPixmap&, const QPointF& );
109
110 virtual void drawImage(const QRectF&, const QImage&,
111 const QRectF&, Qt::ImageConversionFlags );
112
113 virtual void updateState( const QPaintEngineState& );
114
115 protected:
117 virtual QSize sizeMetrics() const = 0;
118
119 private:
120 class PaintEngine;
121 PaintEngine* m_engine;
122
123 class PrivateData;
124 PrivateData* m_data;
125};
126
127#endif
A null paint device doing nothing.