source: ntrip/trunk/GnssCenter/qwt/qwt_null_paintdevice.h@ 7285

Last change on this file since 7285 was 4839, checked in by mervart, 12 years ago
File size: 2.6 KB
Line 
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
17/*!
18 \brief A null paint device doing nothing
19
20 Sometimes important layout/rendering geometries are not
21 available or changable from the public Qt class interface.
22 ( f.e hidden in the style implementation ).
23
24 QwtNullPaintDevice can be used to manipulate or filter out
25 these informations by analyzing the stream of paint primitives.
26
27 F.e. QwtNullPaintDevice is used by QwtPlotCanvas to identify
28 styled backgrounds with rounded corners.
29*/
30
31class QWT_EXPORT QwtNullPaintDevice: public QPaintDevice
32{
33public:
34 QwtNullPaintDevice( QPaintEngine::PaintEngineFeatures );
35 QwtNullPaintDevice( const QSize &size,
36 QPaintEngine::PaintEngineFeatures );
37
38 virtual ~QwtNullPaintDevice();
39
40 void setSize( const QSize &);
41 QSize size() const;
42
43 virtual QPaintEngine *paintEngine() const;
44 virtual int metric( PaintDeviceMetric metric ) const;
45
46 virtual void drawRects(const QRect *, int );
47 virtual void drawRects(const QRectF *, int );
48
49 virtual void drawLines(const QLine *, int );
50 virtual void drawLines(const QLineF *, int );
51
52 virtual void drawEllipse(const QRectF &);
53 virtual void drawEllipse(const QRect &);
54
55 virtual void drawPath(const QPainterPath &);
56
57 virtual void drawPoints(const QPointF *, int );
58 virtual void drawPoints(const QPoint *, int );
59
60 virtual void drawPolygon(
61 const QPointF *, int , QPaintEngine::PolygonDrawMode );
62
63 virtual void drawPolygon(
64 const QPoint *, int , QPaintEngine::PolygonDrawMode );
65
66 virtual void drawPixmap(const QRectF &,
67 const QPixmap &, const QRectF &);
68
69 virtual void drawTextItem(const QPointF &, const QTextItem &);
70
71 virtual void drawTiledPixmap(const QRectF &,
72 const QPixmap &, const QPointF &s);
73
74 virtual void drawImage(const QRectF &,
75 const QImage &, const QRectF &, Qt::ImageConversionFlags );
76
77 virtual void updateState( const QPaintEngineState &state );
78
79private:
80 void init( QPaintEngine::PaintEngineFeatures );
81
82 class PaintEngine;
83 PaintEngine *d_engine;
84
85 class PrivateData;
86 PrivateData *d_data;
87};
88
89#endif
Note: See TracBrowser for help on using the repository browser.