1
/* -*- mode: C++ ; c-file-style: "stroustrup" -*- *****************************
3
* Copyright (C) 1997 Josef Wilgen
4
* Copyright (C) 2002 Uwe Rathmann
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
*****************************************************************************/
10
#ifndef QWT_PAINT_BUFFER_H
11
#define QWT_PAINT_BUFFER_H 1
14
#if QT_VERSION < 0x040000
17
#include "qwt_global.h"
22
\brief Paint buffer for Qwt widgets
24
QwtPaintBuffer offers a simple way to en/disable double buffering.
25
Double buffering is enabled as default and in general there will be
26
no reason to change this.
29
class QWT_EXPORT QwtPaintBuffer
32
explicit QwtPaintBuffer();
33
explicit QwtPaintBuffer(QPaintDevice *, const QRect &, QPainter *p = NULL);
35
virtual ~QwtPaintBuffer();
37
void open(QPaintDevice *, const QRect &, QPainter *p = NULL);
41
const QPaintDevice *device();
43
static void setEnabled(bool enable);
44
static bool isEnabled();
46
//! Return Buffer used for double buffering
47
const QPixmap &buffer() const { return d_pixBuffer; }
56
QPaintDevice *d_device; // use QGuardedPtr
57
QPainter *d_painter; // use QGuardedPtr
58
QPainter *d_devicePainter; // use QGuardedPtr
60
static bool d_enabled;
63
#endif // QT_VERSION < 0x040000