Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QWidgetRepaintManager Class Reference

#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 ()
QBackingStorebackingStore () 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 &region, 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)

Detailed Description

Definition at line 30 of file qwidgetrepaintmanager_p.h.

Member Enumeration Documentation

◆ BufferState

Enumerator
BufferValid 
BufferInvalid 

Definition at line 40 of file qwidgetrepaintmanager_p.h.

◆ UpdateTime

Enumerator
UpdateNow 
UpdateLater 

Definition at line 34 of file qwidgetrepaintmanager_p.h.

Constructor & Destructor Documentation

◆ QWidgetRepaintManager()

QWidgetRepaintManager::QWidgetRepaintManager ( QWidget * t)

Definition at line 74 of file qwidgetrepaintmanager.cpp.

◆ ~QWidgetRepaintManager()

QWidgetRepaintManager::~QWidgetRepaintManager ( )

Definition at line 101 of file qwidgetrepaintmanager.cpp.

Member Function Documentation

◆ addStaticWidget()

void QWidgetRepaintManager::addStaticWidget ( QWidget * widget)

Definition at line 1093 of file qwidgetrepaintmanager.cpp.

◆ backingStore()

QBackingStore * QWidgetRepaintManager::backingStore ( ) const
inline

Definition at line 49 of file qwidgetrepaintmanager_p.h.

◆ bltRect()

bool QWidgetRepaintManager::bltRect ( const QRect & rect,
int dx,
int dy,
QWidget * widget )

Definition at line 527 of file qwidgetrepaintmanager.cpp.

◆ dirtyRegion()

QRegion QWidgetRepaintManager::dirtyRegion ( ) const
inline

Definition at line 67 of file qwidgetrepaintmanager_p.h.

◆ dirtyWidgetList()

QList< QWidget * > QWidgetRepaintManager::dirtyWidgetList ( ) const
inline

Definition at line 68 of file qwidgetrepaintmanager_p.h.

◆ isDirty()

bool QWidgetRepaintManager::isDirty ( ) const

Definition at line 1199 of file qwidgetrepaintmanager.cpp.

◆ markDirty()

template<class T>
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.

◆ markNeedsFlush()

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 922 of file qwidgetrepaintmanager.cpp.

◆ moveStaticWidgets()

void QWidgetRepaintManager::moveStaticWidgets ( QWidget * reparented)

Definition at line 1105 of file qwidgetrepaintmanager.cpp.

◆ removeDirtyWidget()

void QWidgetRepaintManager::removeDirtyWidget ( QWidget * w)

Definition at line 293 of file qwidgetrepaintmanager.cpp.

◆ removeStaticWidget()

void QWidgetRepaintManager::removeStaticWidget ( QWidget * widget)

Definition at line 1125 of file qwidgetrepaintmanager.cpp.

◆ setBackingStore()

void QWidgetRepaintManager::setBackingStore ( QBackingStore * backingStore)
inline

Definition at line 50 of file qwidgetrepaintmanager_p.h.

◆ staticContents()

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 1140 of file qwidgetrepaintmanager.cpp.

◆ sync() [1/2]

void QWidgetRepaintManager::sync ( )

Synchronizes the backing store, i.e.

dirty areas are repainted and flushed.

Definition at line 639 of file qwidgetrepaintmanager.cpp.

◆ sync() [2/2]

void QWidgetRepaintManager::sync ( QWidget * exposedWidget,
const QRegion & exposedRegion )

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 606 of file qwidgetrepaintmanager.cpp.


The documentation for this class was generated from the following files: