#include <qevent.h>
Inheritance diagram for QPaintEvent:


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.
Definition at line 261 of file qevent.h.
Public Member Functions | |
| QPaintEvent (const QRegion &paintRegion) | |
| QPaintEvent (const QRect &paintRect) | |
| ~QPaintEvent () | |
| const QRect & | rect () const |
| const QRegion & | region () const |
Protected Attributes | |
| QRect | m_rect |
| QRegion | m_region |
| bool | m_erased |
Friends | |
| class | QApplication |
| class | QCoreApplication |
| 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 1021 of file qevent.cpp.
01022 : QEvent(Paint), m_rect(paintRegion.boundingRect()), m_region(paintRegion), m_erased(false) 01023 {}
| QPaintEvent::QPaintEvent | ( | const QRect & | paintRect | ) |
| QPaintEvent::~QPaintEvent | ( | ) |
| const QRect & QPaintEvent::rect | ( | ) | const [inline] |
Returns the rectangle that needs to be updated.
Definition at line 268 of file qevent.h.
Referenced by Helper::paint(), QTextEditPrivate::paint(), QColorShowLabel::paintEvent(), QMenuBar::paintEvent(), Q3TableHeader::paintEvent(), ArthurFrame::paintEvent(), QHeaderView::paintEvent(), QDesignerDialog::paintEvent(), Oubliette::paintEvent(), QHideDock::paintEvent(), QListView::paintEvent(), QMenu::paintEvent(), Q3Header::paintEvent(), paintGrid(), and Q3ScrollView::viewportPaintEvent().
00268 { return m_rect; }
| const QRegion & QPaintEvent::region | ( | ) | const [inline] |
Returns the region that needs to be updated.
Definition at line 269 of file qevent.h.
Referenced by Q3TableHeader::paintEvent(), qdesigner_internal::ConnectionEdit::paintEvent(), qdesigner_internal::TabOrderEditor::paintEvent(), and Q3ListBox::viewportPaintEvent().
00269 { return m_region; }
friend class QApplication [friend] |
friend class QCoreApplication [friend] |
QRect QPaintEvent::m_rect [protected] |
QRegion QPaintEvent::m_region [protected] |
bool QPaintEvent::m_erased [protected] |
1.5.1