QWT 7.0.1
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 * Modified by ChenZongYan in 2024 <czy.t@163.com>
10 * Summary of major modifications (see ChangeLog.md for full history):
11 * 1. CMake build system & C++11 throughout.
12 * 2. Core panner/ zoomer refactored:
13 * - QwtPanner → QwtCachePanner (pixmap-cache version)
14 * - New real-time QwtPlotPanner derived from QwtPicker.
15 * 3. Zoomer supports multi-axis.
16 * 4. Parasite-plot framework:
17 * - QwtFigure, QwtPlotParasiteLayout, QwtPlotTransparentCanvas,
18 * - QwtPlotScaleEventDispatcher, built-in pan/zoom on axis.
19 * 5. New picker: QwtPlotSeriesDataPicker (works with date axis).
20 * 6. Raster & color-map extensions:
21 * - QwtGridRasterData (2-D table + interpolation)
22 * - QwtLinearColorMap::stopColors(), stopPos() API rename.
23 * 7. Bar-chart: expose pen/brush control.
24 * 8. Amalgamated build: single QwtPlot.h / QwtPlot.cpp pair in src-amalgamate.
25 *****************************************************************************/
26
27#ifndef QWT_NULL_PAINT_DEVICE_H
28#define QWT_NULL_PAINT_DEVICE_H
29
30#include "qwt_global.h"
31
32#include <qpaintdevice.h>
33#include <qpaintengine.h>
34
49class QWT_EXPORT QwtNullPaintDevice : public QPaintDevice
50{
51 public:
57 enum Mode
58 {
64
76
86 PathMode
87 };
88
90 virtual ~QwtNullPaintDevice();
91
92 void setMode( Mode );
93 Mode mode() const;
94
95 virtual QPaintEngine* paintEngine() const QWT_OVERRIDE;
96
97 virtual int metric( PaintDeviceMetric ) const QWT_OVERRIDE;
98
99 virtual void drawRects(const QRect*, int );
100 virtual void drawRects(const QRectF*, int );
101
102 virtual void drawLines(const QLine*, int );
103 virtual void drawLines(const QLineF*, int );
104
105 virtual void drawEllipse(const QRectF&);
106 virtual void drawEllipse(const QRect&);
107
108 virtual void drawPath(const QPainterPath&);
109
110 virtual void drawPoints(const QPointF*, int );
111 virtual void drawPoints(const QPoint*, int );
112
113 virtual void drawPolygon( const QPointF*, int,
114 QPaintEngine::PolygonDrawMode );
115
116 virtual void drawPolygon( const QPoint*, int,
117 QPaintEngine::PolygonDrawMode );
118
119 virtual void drawPixmap(const QRectF&,
120 const QPixmap&, const QRectF&);
121
122 virtual void drawTextItem(const QPointF&, const QTextItem&);
123
124 virtual void drawTiledPixmap(const QRectF&,
125 const QPixmap&, const QPointF& );
126
127 virtual void drawImage(const QRectF&, const QImage&,
128 const QRectF&, Qt::ImageConversionFlags );
129
130 virtual void updateState( const QPaintEngineState& );
131
132 protected:
134 virtual QSize sizeMetrics() const = 0;
135
136 private:
137 class PaintEngine;
138 PaintEngine* m_engine;
139
140 class PrivateData;
141 PrivateData* m_data;
142};
143
144#endif
A null paint device doing nothing.
Definition qwt_null_paintdevice.h:50
Mode
Render mode.
Definition qwt_null_paintdevice.h:58
@ NormalMode
All vector graphic primitives are painted by the corresponding draw methods.
Definition qwt_null_paintdevice.h:63
@ PolygonPathMode
Vector graphic primitives ( beside polygons ) are mapped to a QPainterPath and are painted by drawPat...
Definition qwt_null_paintdevice.h:75