Qt 4.8
|
The QPaintEvent class contains event parameters for paint events. More...
#include <qevent.h>
Public Functions | |
QPaintEvent (const QRegion &paintRegion) | |
Constructs a paint event object with the region that needs to be updated. More... | |
QPaintEvent (const QRect &paintRect) | |
Constructs a paint event object with the rectangle that needs to be updated. More... | |
const QRect & | rect () const |
Returns the rectangle that needs to be updated. More... | |
const QRegion & | region () const |
Returns the region that needs to be updated. More... | |
~QPaintEvent () | |
Public Functions inherited from QEvent | |
void | accept () |
Sets the accept flag of the event object, the equivalent of calling setAccepted(true). More... | |
void | ignore () |
Clears the accept flag parameter of the event object, the equivalent of calling setAccepted(false). More... | |
bool | isAccepted () const |
QEvent (Type type) | |
Contructs an event object of type type. More... | |
void | setAccepted (bool accepted) |
bool | spontaneous () const |
Returns true if the event originated outside the application (a system event); otherwise returns false. More... | |
Type | type () const |
Returns the event type. More... | |
virtual | ~QEvent () |
Destroys the event. More... | |
Protected Variables | |
bool | m_erased |
QRect | m_rect |
QRegion | m_region |
Protected Variables inherited from QEvent | |
QEventPrivate * | d |
ushort | t |
Friends | |
class | QApplication |
class | QCoreApplication |
The QPaintEvent class contains event parameters for paint events.
Paint events are sent to widgets that need to update themselves, for instance when part of a widget is exposed because a covering widget was moved.
The event contains a region() that needs to be updated, and a rect() that is the bounding rectangle of that region. Both are provided because many widgets can't make much use of region(), and rect() can be much faster than region().boundingRect().
Painting is clipped to region() during the processing of a paint event. This clipping is performed by Qt's paint system and is independent of any clipping that may be applied to a QPainter used to draw on the paint device.
As a result, the value returned by QPainter::clipRegion() on a newly-constructed QPainter will not reflect the clip region that is used by the paint system.
QPaintEvent::QPaintEvent | ( | const QRegion & | paintRegion | ) |
Constructs a paint event object with the region that needs to be updated.
The region is specified by paintRegion.
Definition at line 1311 of file qevent.cpp.
Referenced by QPaintEvent().
QPaintEvent::QPaintEvent | ( | const QRect & | paintRect | ) |
Constructs a paint event object with the rectangle that needs to be updated.
The region is specified by paintRect.
Definition at line 1319 of file qevent.cpp.
QPaintEvent::~QPaintEvent | ( | ) |
Definition at line 1339 of file qevent.cpp.
|
inline |
Returns the rectangle that needs to be updated.
Definition at line 305 of file qevent.h.
Referenced by QScriptEdit::extraAreaPaintEvent(), QTextEditPrivate::paint(), QStatusBar::paintEvent(), QComboBoxListView::paintEvent(), QMenuBar::paintEvent(), QListView::paintEvent(), QMenu::paintEvent(), QHeaderView::paintEvent(), QPlainTextEdit::paintEvent(), and QColorShowLabel::paintEvent().
|
inline |
Returns the region that needs to be updated.
Definition at line 306 of file qevent.h.
Referenced by QMdiArea::paintEvent(), and QTreeView::paintEvent().
|
friend |
|
friend |
|
protected |
Definition at line 319 of file qevent.h.
Referenced by QPaintEvent().
|
protected |
Definition at line 317 of file qevent.h.
Referenced by QPaintEvent().
|
protected |
Definition at line 318 of file qevent.h.
Referenced by QPaintEvent().