#include <qwt_paint_buffer.h>

Public Member Functions | |
| void | close () |
| const QPaintDevice * | device () |
| void | open (QPaintDevice *, const QRect &, QPainter *painter=NULL) |
| QPainter * | painter () |
| QwtPaintBuffer (QPaintDevice *, const QRect &, QPainter *painter=NULL) | |
| QwtPaintBuffer () | |
| Default constructor. | |
| virtual | ~QwtPaintBuffer () |
Static Public Member Functions | |
| static bool | isEnabled () |
| static void | setEnabled (bool enable) |
Protected Member Functions | |
| void | flush () |
Private Attributes | |
| QPaintDevice * | d_device |
| QPainter * | d_devicePainter |
| QPainter * | d_painter |
| QPixmap | d_pixBuffer |
| QRect | d_rect |
Static Private Attributes | |
| static bool | d_enabled = TRUE |
QwtPaintBuffer offers a simple way to en/disable double buffering. Double buffering is enabled as default and in general there will be no reason to change this.
Definition at line 38 of file qwt_paint_buffer.h.
| QwtPaintBuffer | ( | ) |
| QwtPaintBuffer | ( | QPaintDevice * | device, | |
| const QRect & | rect, | |||
| QPainter * | painter = NULL | |||
| ) |
Create an open paint buffer
| device | Device to paint on | |
| rect | Rect to paint on | |
| painter | Painter to paint on device. In case of 0 QwtPaintBuffer uses an internal painter |
Definition at line 59 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::open().
| ~QwtPaintBuffer | ( | ) | [virtual] |
Closes the buffer
Definition at line 72 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::close().
| void close | ( | ) |
Flush the internal pixmap buffer to the device and close the buffer.
Definition at line 209 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::d_device, QwtPaintBuffer::d_devicePainter, QwtPaintBuffer::d_painter, QwtPaintBuffer::d_pixBuffer, QPainter::end(), QwtPaintBuffer::flush(), QPainter::isActive(), and QPixmap::isNull().
Referenced by QwtPaintBuffer::open(), and QwtPaintBuffer::~QwtPaintBuffer().
| const QPaintDevice * device | ( | ) |
Definition at line 91 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::d_device.
Referenced by QwtPaintBuffer::flush().
| void flush | ( | ) | [protected] |
Flush the internal pixmap buffer to the device.
Definition at line 176 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::d_device, QwtPaintBuffer::d_devicePainter, QwtPaintBuffer::d_enabled, QwtPaintBuffer::d_pixBuffer, QwtPaintBuffer::d_rect, QPainter::device(), QwtPaintBuffer::device(), QPainter::drawPixmap(), QPaintDevice::isExtDev(), QRect::isValid(), QRect::topLeft(), and num_util::type().
Referenced by QwtPaintBuffer::close().
| bool isEnabled | ( | ) | [static] |
Definition at line 109 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::d_enabled.
Referenced by QwtPaintBuffer::open().
| void open | ( | QPaintDevice * | device, | |
| const QRect & | rect, | |||
| QPainter * | painter = NULL | |||
| ) |
Open the buffer
| device | Device to paint on | |
| rect | Rect to paint on | |
| painter | Painter to paint on device. In case of 0 QwtPaintBuffer uses an internal painter |
Definition at line 122 of file qwt_paint_buffer.cpp.
References QPainter::begin(), QwtPaintBuffer::close(), QwtPaintBuffer::d_device, QwtPaintBuffer::d_devicePainter, QwtPaintBuffer::d_painter, QwtPaintBuffer::d_pixBuffer, QwtPaintBuffer::d_rect, QPainter::eraseRect(), QPixmap::fill(), QwtPaintBuffer::isEnabled(), QRect::isValid(), QPixmap::resize(), QRect::size(), QWidget::testWFlags(), QRect::topLeft(), QPainter::translate(), QRect::x(), and QRect::y().
Referenced by QwtPaintBuffer::QwtPaintBuffer().
| QPainter * painter | ( | ) |
Definition at line 83 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::d_painter.
Referenced by QtViewWidget::paintEvent().
| void setEnabled | ( | bool | enable | ) | [static] |
Enable/Disable double buffering. Please note that this is a global switch for all QwtPaintBuffers, but won't change opened buffers.
Definition at line 101 of file qwt_paint_buffer.cpp.
References QwtPaintBuffer::d_enabled.
QPaintDevice* d_device [private] |
Definition at line 62 of file qwt_paint_buffer.h.
Referenced by QwtPaintBuffer::close(), QwtPaintBuffer::device(), QwtPaintBuffer::flush(), and QwtPaintBuffer::open().
QPainter* d_devicePainter [private] |
Definition at line 64 of file qwt_paint_buffer.h.
Referenced by QwtPaintBuffer::close(), QwtPaintBuffer::flush(), and QwtPaintBuffer::open().
bool d_enabled = TRUE [static, private] |
Definition at line 66 of file qwt_paint_buffer.h.
Referenced by QwtPaintBuffer::flush(), QwtPaintBuffer::isEnabled(), and QwtPaintBuffer::setEnabled().
Definition at line 63 of file qwt_paint_buffer.h.
Referenced by QwtPaintBuffer::close(), QwtPaintBuffer::open(), and QwtPaintBuffer::painter().
QPixmap d_pixBuffer [private] |
Definition at line 59 of file qwt_paint_buffer.h.
Referenced by QwtPaintBuffer::close(), QwtPaintBuffer::flush(), and QwtPaintBuffer::open().
Definition at line 60 of file qwt_paint_buffer.h.
Referenced by QwtPaintBuffer::flush(), and QwtPaintBuffer::open().