qwt_paint_buffer.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef QWT_PAINT_BUFFER_H
00021 #define QWT_PAINT_BUFFER_H 1
00022
00023 #include <qpixmap.h>
00024
00025
00026 class QPainter;
00027
00028 namespace hippodraw {
00029
00038 class QwtPaintBuffer
00039 {
00040 public:
00041 QwtPaintBuffer();
00042 QwtPaintBuffer(QPaintDevice *, const QRect &, QPainter *painter = NULL);
00043
00044 virtual ~QwtPaintBuffer();
00045
00046 void open(QPaintDevice *, const QRect &, QPainter *painter = NULL);
00047 void close();
00048
00049 QPainter *painter();
00050 const QPaintDevice *device();
00051
00052 static void setEnabled(bool enable);
00053 static bool isEnabled();
00054
00055 protected:
00056 void flush();
00057
00058 private:
00059 QPixmap d_pixBuffer;
00060 QRect d_rect;
00061
00062 QPaintDevice *d_device;
00063 QPainter *d_painter;
00064 QPainter *d_devicePainter;
00065
00066 static bool d_enabled;
00067 };
00068
00069 }
00070
00071 #endif