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

qwt_paint_buffer.h

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 00044 const QPixmap &buffer() const { return d_pixBuffer; } 00045 00046 protected: 00047 void flush(); 00048 00049 private: 00050 QPixmap d_pixBuffer; 00051 QRect d_rect; 00052 00053 QPaintDevice *d_device; // use QGuardedPtr 00054 QPainter *d_painter; // use QGuardedPtr 00055 QPainter *d_devicePainter; // use QGuardedPtr 00056 00057 static bool d_enabled; 00058 }; 00059 00060 #endif

Generated on Tue Nov 16 21:12:20 2004 for Qwt User's Guide by doxygen 1.3.8