Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | File Members | Related Pages

qwt_paint_buffer.h

Go to the documentation of this file.
00001 /* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
00002  * Qwt Widget Library
00003  * Copyright (C) 1997   Josef Wilgen
00004  * Copyright (C) 2002   Uwe Rathmann
00005  * 
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the Qwt License, Version 1.0
00008  *****************************************************************************/
00009 
00010 #ifndef QWT_PAINT_BUFFER_H
00011 #define QWT_PAINT_BUFFER_H 1
00012 
00013 #include <qpixmap.h>
00014 #include "qwt_global.h"
00015 
00016 class QPainter;
00017 
00026 class QWT_EXPORT QwtPaintBuffer
00027 {
00028 public:
00029     QwtPaintBuffer();
00030     QwtPaintBuffer(QPaintDevice *, const QRect &, QPainter *p = NULL);
00031 
00032     virtual ~QwtPaintBuffer();
00033 
00034     void open(QPaintDevice *, const QRect &, QPainter *p = NULL);
00035     void close();
00036 
00037     QPainter *painter();
00038     const QPaintDevice *device();
00039     
00040     static void setEnabled(bool enable);
00041     static bool isEnabled();
00042 
00043 protected:
00044     void flush();
00045 
00046 private:
00047     QPixmap d_pixBuffer;
00048     QRect d_rect;
00049 
00050     QPaintDevice *d_device; // use QGuardedPtr
00051     QPainter *d_painter; // use QGuardedPtr
00052     QPainter *d_devicePainter; // use QGuardedPtr
00053 
00054     static bool d_enabled;
00055 };
00056 
00057 #endif

Generated on Fri Nov 7 14:11:45 2003 for Qwt Developer's Guide by doxygen 1.3.2