Qt 4.8
|
Class which allows tracking of which widgets are using a given backing store. More...
#include <qwidget_p.h>
Public Functions | |
void | create (QWidget *tlw) |
Destroy the contained QWidgetBackingStore, if not null, and clear the list of widgets using the backing store, then create a new QWidgetBackingStore, providing the QWidget. More... | |
QWidgetBackingStore * | data () |
void | destroy () |
Destroy the contained QWidgetBackingStore, if not null, and clear the list of widgets using the backing store. More... | |
operator bool () const | |
QWidgetBackingStore & | operator* () |
QWidgetBackingStore * | operator-> () |
QWidgetBackingStoreTracker () | |
void | registerWidget (QWidget *w) |
Add the widget to the list of widgets currently using the backing store. More... | |
void | unregisterWidget (QWidget *w) |
Remove the widget from the list of widgets currently using the backing store. More... | |
void | unregisterWidgetSubtree (QWidget *w) |
Recursively remove widget and all of its descendents. More... | |
~QWidgetBackingStoreTracker () | |
Properties | |
QWidgetBackingStore * | m_ptr |
QSet< QWidget * > | m_widgets |
Class which allows tracking of which widgets are using a given backing store.
QWidgetBackingStoreTracker is a thin wrapper around a QWidgetBackingStore pointer, which maintains a list of the QWidgets which are currently using the backing store. This list is modified via the registerWidget and unregisterWidget functions.
Definition at line 118 of file qwidget_p.h.
QWidgetBackingStoreTracker::QWidgetBackingStoreTracker | ( | ) |
Definition at line 198 of file qwidget.cpp.
QWidgetBackingStoreTracker::~QWidgetBackingStoreTracker | ( | ) |
Definition at line 204 of file qwidget.cpp.
void QWidgetBackingStoreTracker::create | ( | QWidget * | widget | ) |
Destroy the contained QWidgetBackingStore, if not null, and clear the list of widgets using the backing store, then create a new QWidgetBackingStore, providing the QWidget.
Definition at line 218 of file qwidget.cpp.
|
inline |
Definition at line 132 of file qwidget_p.h.
Referenced by QWidgetPrivate::maybeBackingStore(), QWidgetPrivate::moveRect(), and QWidgetPrivate::scrollRect().
void QWidgetBackingStoreTracker::destroy | ( | ) |
Destroy the contained QWidgetBackingStore, if not null, and clear the list of widgets using the backing store.
Definition at line 232 of file qwidget.cpp.
Referenced by create().
|
inline |
Definition at line 147 of file qwidget_p.h.
|
inline |
Definition at line 142 of file qwidget_p.h.
|
inline |
Definition at line 137 of file qwidget_p.h.
void QWidgetBackingStoreTracker::registerWidget | ( | QWidget * | w | ) |
Add the widget to the list of widgets currently using the backing store.
If the widget was already in the list, this function is a no-op.
Definition at line 247 of file qwidget.cpp.
void QWidgetBackingStoreTracker::unregisterWidget | ( | QWidget * | w | ) |
Remove the widget from the list of widgets currently using the backing store.
If the widget was in the list, and removing it causes the list to be empty, the backing store is deleted. If the widget was not in the list, this function is a no-op.
Definition at line 265 of file qwidget.cpp.
Referenced by unregisterWidgetSubtree().
void QWidgetBackingStoreTracker::unregisterWidgetSubtree | ( | QWidget * | widget | ) |
Recursively remove widget and all of its descendents.
Definition at line 280 of file qwidget.cpp.
|
private |
Definition at line 156 of file qwidget_p.h.
Referenced by create(), destroy(), registerWidget(), unregisterWidget(), and ~QWidgetBackingStoreTracker().
Definition at line 157 of file qwidget_p.h.
Referenced by destroy(), registerWidget(), and unregisterWidget().