|
Krita Source Code Documentation
|
#include <KisRootSurfaceTrackerBase.h>
Inheritance diagram for KisRootSurfaceTrackerBase:Public Member Functions | |
| KisRootSurfaceTrackerBase (QWidget *watched, QObject *parent=nullptr) | |
| QWidget * | trackedWidget () const |
| ~KisRootSurfaceTrackerBase () | |
Protected Member Functions | |
| virtual void | connectToNativeWindow (QWindow *nativeWindow)=0 |
| virtual void | disconnectFromNativeWindow ()=0 |
| void | initialize () |
Private Member Functions | |
| bool | eventFilter (QObject *watched, QEvent *event) override |
| QVector< QPointer< QObject > > | getCurrentHierarchy (QWidget *wdg) |
| void | reconnectToHierarchy (const QVector< QPointer< QObject > > newHierarchy) |
| void | tryReconnectToNativeWindow () |
| void | tryUpdateHierarchy () |
Private Attributes | |
| QPointer< QObject > | m_childChangedFilter |
| QPointer< QWindow > | m_topLevelNativeWindow |
| QPointer< QWidget > | m_topLevelWidgetWithSurface |
| QWidget * | m_watched {nullptr} |
| QVector< QPointer< QObject > > | m_watchedHierarchy |
KisRootSurfaceProxyBase is a special proxy object for toplevel native window attached to the current QWidget
When created, the proxy does the following:
1) Finds the top-level widget that watched belongs to. (is watched changed its parent in the meantime, e.g. during construction, then the proxy will handle that as well)
2) Finds the QWindow that this toplevel widget is painted on (if platform window is not created yet, subscribes to QPlatformSurfaceEvent to attach when platform window is finally created)
3) When found, calls implementation of connectToNativeWindow() that would connect to the actual native window
Definition at line 37 of file KisRootSurfaceTrackerBase.h.
| KisRootSurfaceTrackerBase::KisRootSurfaceTrackerBase | ( | QWidget * | watched, |
| QObject * | parent = nullptr ) |
Definition at line 50 of file KisRootSurfaceTrackerBase.cpp.
| KisRootSurfaceTrackerBase::~KisRootSurfaceTrackerBase | ( | ) |
Definition at line 56 of file KisRootSurfaceTrackerBase.cpp.
|
protectedpure virtual |
Implemented in KisRootSurfaceInfoProxy, and KisScreenMigrationTracker.
|
protectedpure virtual |
Implemented in KisRootSurfaceInfoProxy, and KisScreenMigrationTracker.
|
overrideprivate |
Definition at line 70 of file KisRootSurfaceTrackerBase.cpp.
References m_watchedHierarchy, tryReconnectToNativeWindow(), and tryUpdateHierarchy().
|
private |
Definition at line 138 of file KisRootSurfaceTrackerBase.cpp.
|
protected |
Definition at line 65 of file KisRootSurfaceTrackerBase.cpp.
References tryUpdateHierarchy().
|
private |
Definition at line 156 of file KisRootSurfaceTrackerBase.cpp.
References KIS_SAFE_ASSERT_RECOVER, and m_watchedHierarchy.
| QWidget * KisRootSurfaceTrackerBase::trackedWidget | ( | ) | const |
Definition at line 60 of file KisRootSurfaceTrackerBase.cpp.
References m_watched.
|
private |
Definition at line 102 of file KisRootSurfaceTrackerBase.cpp.
References connectToNativeWindow(), disconnectFromNativeWindow(), m_childChangedFilter, m_topLevelNativeWindow, m_topLevelWidgetWithSurface, and tryReconnectToNativeWindow().
|
private |
Definition at line 89 of file KisRootSurfaceTrackerBase.cpp.
References getCurrentHierarchy(), m_topLevelWidgetWithSurface, m_watched, m_watchedHierarchy, reconnectToHierarchy(), and tryReconnectToNativeWindow().
|
private |
Definition at line 69 of file KisRootSurfaceTrackerBase.h.
|
private |
Definition at line 68 of file KisRootSurfaceTrackerBase.h.
|
private |
Definition at line 66 of file KisRootSurfaceTrackerBase.h.
|
private |
Definition at line 63 of file KisRootSurfaceTrackerBase.h.
Definition at line 64 of file KisRootSurfaceTrackerBase.h.