![]() |
Qt 6.x
The Qt SDK
|
#include <qwidgetrepaintmanager_p.h>
Collaboration diagram for QWidgetRepaintManager:Public Types | |
| enum | UpdateTime { UpdateNow , UpdateLater } |
| enum | BufferState { BufferValid , BufferInvalid } |
Public Member Functions | |
| QWidgetRepaintManager (QWidget *t) | |
| ~QWidgetRepaintManager () | |
| QBackingStore * | backingStore () const |
| void | setBackingStore (QBackingStore *backingStore) |
| template<class T > | |
| void | markDirty (const T &r, QWidget *widget, UpdateTime updateTime=UpdateLater, BufferState bufferState=BufferValid) |
| void | removeDirtyWidget (QWidget *w) |
| void | sync (QWidget *exposedWidget, const QRegion &exposedRegion) |
| Synchronizes the exposedRegion of the exposedWidget with the backing store. | |
| void | sync () |
| Synchronizes the backing store, i.e. | |
| void | markNeedsFlush (QWidget *widget, const QRegion ®ion, const QPoint &topLevelOffset) |
| Marks the region of the widget as needing a flush. | |
| void | addStaticWidget (QWidget *widget) |
| void | moveStaticWidgets (QWidget *reparented) |
| void | removeStaticWidget (QWidget *widget) |
| QRegion | staticContents (QWidget *widget=nullptr, const QRect &withinClipRect=QRect()) const |
| Returns the static content inside the parent if non-zero; otherwise the static content for the entire backing store is returned. | |
| QRegion | dirtyRegion () const |
| QList< QWidget * > | dirtyWidgetList () const |
| bool | isDirty () const |
| bool | bltRect (const QRect &rect, int dx, int dy, QWidget *widget) |
| QRhi * | rhi () const |
Definition at line 32 of file qwidgetrepaintmanager_p.h.
| Enumerator | |
|---|---|
| BufferValid | |
| BufferInvalid | |
Definition at line 42 of file qwidgetrepaintmanager_p.h.
| Enumerator | |
|---|---|
| UpdateNow | |
| UpdateLater | |
Definition at line 36 of file qwidgetrepaintmanager_p.h.
| QWidgetRepaintManager::QWidgetRepaintManager | ( | QWidget * | t | ) |
Definition at line 74 of file qwidgetrepaintmanager.cpp.
References Q_ASSERT.
| QWidgetRepaintManager::~QWidgetRepaintManager | ( | ) |
Definition at line 101 of file qwidgetrepaintmanager.cpp.
References QList< T >::at(), and QList< T >::size().
Here is the call graph for this function:Definition at line 1105 of file qwidgetrepaintmanager.cpp.
References QList< T >::append(), QListSpecialMethodsBase< T >::contains(), Q_ASSERT, QWidget::testAttribute(), Qt::WA_StaticContents, and widget.
Referenced by moveStaticWidgets().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 51 of file qwidgetrepaintmanager_p.h.
Referenced by QWidget::backingStore().
Here is the caller graph for this function:Definition at line 523 of file qwidgetrepaintmanager.cpp.
References QRegion::intersects(), QWidget::mapTo(), pos, rect, QBackingStore::scroll(), and widget.
Referenced by QWidgetPrivate::moveRect(), and QWidgetPrivate::scrollRect().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Definition at line 69 of file qwidgetrepaintmanager_p.h.
Definition at line 70 of file qwidgetrepaintmanager_p.h.
| bool QWidgetRepaintManager::isDirty | ( | ) | const |
Definition at line 1215 of file qwidgetrepaintmanager.cpp.
References QRegion::isEmpty(), and QList< T >::isEmpty().
Referenced by sync().
Here is the call graph for this function:
Here is the caller graph for this function:| template void QWidgetRepaintManager::markDirty< QRegion > | ( | const T & | r, |
| QWidget * | widget, | ||
| UpdateTime | updateTime = UpdateLater, |
||
| BufferState | bufferState = BufferValid |
||
| ) |
Marks the region of the widget as dirty (if not already marked as dirty) and posts an UpdateRequest event to the top-level widget (if not already posted).
If updateTime is UpdateNow, the event is sent immediately instead of posted.
If bufferState is BufferInvalid, all widgets intersecting with the region will be dirty.
If the widget paints directly on screen, the event is sent to the widget instead of the top-level widget, and bufferState is completely ignored.
Definition at line 169 of file qwidgetrepaintmanager.cpp.
References BufferInvalid, QWidgetPrivate::get(), QRect::intersected(), QRegion::isEmpty(), QList< T >::isEmpty(), QWidget::isVisible(), QWidget::mapTo(), Q_ASSERT, qCInfo, QWidget::size, QRegion::translated(), QRect::translated(), UpdateNow, QWidget::updatesEnabled, widget, widgetRectFor(), and QWidget::window().
Referenced by QWidgetPrivate::moveRect(), and QWidgetPrivate::scrollRect().
Here is the call graph for this function:
Here is the caller graph for this function:| void QWidgetRepaintManager::markNeedsFlush | ( | QWidget * | widget, |
| const QRegion & | region, | ||
| const QPoint & | topLevelOffset | ||
| ) |
Marks the region of the widget as needing a flush.
The region will be copied from the backing store to the widget's native parent next time flush() is called.
Paint on screen widgets are ignored.
Definition at line 917 of file qwidgetrepaintmanager.cpp.
References hasPlatformWindow(), QRegion::isEmpty(), QWidget::isWindow(), QWidget::mapTo(), markNeedsFlush(), QWidget::nativeParentWidget(), qCInfo, QRegion::translated(), and widget.
Referenced by QWidgetPrivate::drawWidget(), markNeedsFlush(), QWidgetPrivate::moveRect(), QWidgetPrivate::scrollRect(), and sync().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1117 of file qwidgetrepaintmanager.cpp.
References addStaticWidget(), QList< T >::at(), i, QWidget::isAncestorOf(), Q_ASSERT, QList< T >::removeAt(), and QList< T >::size().
Here is the call graph for this function:Definition at line 293 of file qwidgetrepaintmanager.cpp.
References QList< T >::at(), child, QObjectData::children, i, qobject_cast< QWidget * >(), QList< T >::removeAll(), removeDirtyWidget(), and QList< T >::size().
Referenced by removeDirtyWidget().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 1137 of file qwidgetrepaintmanager.cpp.
References QList< T >::removeAll(), and widget.
Here is the call graph for this function:| QRhi * QWidgetRepaintManager::rhi | ( | ) | const |
Definition at line 1312 of file qwidgetrepaintmanager.cpp.
References QBackingStore::handle(), and QPlatformBackingStore::rhi().
Here is the call graph for this function:
|
inline |
Definition at line 52 of file qwidgetrepaintmanager_p.h.
| QRegion QWidgetRepaintManager::staticContents | ( | QWidget * | parent = nullptr, |
| const QRect & | withinClipRect = QRect() |
||
| ) | const |
Returns the static content inside the parent if non-zero; otherwise the static content for the entire backing store is returned.
The content will be clipped to withinClipRect if non-empty.
Definition at line 1156 of file qwidgetrepaintmanager.cpp.
References QList< T >::at(), QWidgetPrivate::clipRect(), QWidgetPrivate::clipToEffectiveMask(), QWidgetPrivate::extra, i, QRegion::isEmpty(), QRect::isEmpty(), QWidgetPrivate::isOpaque, parent, rect, QBackingStore::size(), QList< T >::size(), QWidgetPrivate::subtractOpaqueSiblings(), QWidget::testAttribute(), QRegion::translate(), QRect::translated(), and Qt::WA_StaticContents.
Referenced by QWidgetPrivate::invalidateBackingStore_resizeHelper().
Here is the call graph for this function:
Here is the caller graph for this function:| void QWidgetRepaintManager::sync | ( | ) |
Synchronizes the backing store, i.e.
dirty areas are repainted and flushed.
Definition at line 635 of file qwidgetrepaintmanager.cpp.
References QList< T >::at(), QList< T >::clear(), i, QWidget::isVisible(), qCInfo, qt_widget_private(), and QList< T >::size().
Here is the call graph for this function:Synchronizes the exposedRegion of the exposedWidget with the backing store.
If there are dirty widgets, including but not limited to the exposedWidget, these will be repainted first. The backingstore is then flushed to the screen, regardless of whether or not there were any repaints.
Definition at line 602 of file qwidgetrepaintmanager.cpp.
References hasPlatformWindow(), isDirty(), QRegion::isEmpty(), QSize::isValid(), QWidget::isVisible(), QWidget::mapTo(), markNeedsFlush(), qCInfo, QBackingStore::size(), QWidget::testAttribute(), QWidget::updatesEnabled, Qt::WA_Mapped, and widgetTexturesFor().
Here is the call graph for this function: