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

qwt_paint_buffer.h

Go to the documentation of this file.
00001 /*-*- c++ -*-******************************************************************
00002  * Qwt Widget Library 
00003  * Copyright (C) 1997   Josef Wilgen
00004  * 
00005  * This library is free software; you can redistribute it and/or
00006  * modify it under the terms of the GNU Lesser General Public
00007  * License as published by the Free Software Foundation; either
00008  * version 2.1 of the License, or (at your option) any later version.
00009  * 
00010  * This library is distributed in the hope that it will be useful,
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013  * Lesser General Public License for more details.
00014  * 
00015  * You should have received a copy of the GNU Lesser General Public
00016  * License along with this library; if not, write to the Free Software
00017  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018  *****************************************************************************/
00019 
00020 #ifndef QWT_PAINT_BUFFER_H
00021 #define QWT_PAINT_BUFFER_H 1
00022 
00023 #include <qpixmap.h>
00024 //#include "qwt_global.h"
00025 
00026 class QPainter;
00027 
00036 class QwtPaintBuffer
00037 {
00038 public:
00039     QwtPaintBuffer();
00040     QwtPaintBuffer(QPaintDevice *, const QRect &, QPainter *painter = NULL);
00041 
00042     virtual ~QwtPaintBuffer();
00043 
00044     void open(QPaintDevice *, const QRect &, QPainter *painter = NULL);
00045     void close();
00046 
00047     QPainter *painter();
00048     const QPaintDevice *device();
00049     
00050     static void setEnabled(bool enable);
00051     static bool isEnabled();
00052 
00053 protected:
00054     void flush();
00055 
00056 private:
00057     QPixmap d_pixBuffer;
00058     QRect d_rect;
00059 
00060     QPaintDevice *d_device; // use QGuardedPtr
00061     QPainter *d_painter; // use QGuardedPtr
00062     QPainter *d_devicePainter; // use QGuardedPtr
00063 
00064     static bool d_enabled;
00065 };
00066 
00067 #endif

Generated for HippoDraw-1.14.8.5 by doxygen 1.4.3