|
Krita Source Code Documentation
|
#include <KisRootSurfaceInfoProxy.h>
Inheritance diagram for KisRootSurfaceInfoProxy:Signals | |
| void | sigRootSurfaceProfileChanged (const KoColorProfile *profile) const |
Public Member Functions | |
| QString | colorManagementReport () const |
| bool | isReady () const |
| KisRootSurfaceInfoProxy (QWidget *watched, QObject *parent=nullptr) | |
| QString | osPreferredColorSpaceReport () const |
| const KoColorProfile * | rootSurfaceProfile () const |
| ~KisRootSurfaceInfoProxy () | |
Private Member Functions | |
| bool | eventFilter (QObject *watched, QEvent *event) override |
| QVector< QPointer< QObject > > | getCurrentHierarchy (QWidget *wdg) |
| void | reconnectToHierarchy (const QVector< QPointer< QObject > > newHierarchy) |
| void | tryReconnectSurfaceManager () |
| void | tryUpdateHierarchy () |
| void | tryUpdateRootSurfaceProfile () |
Private Attributes | |
| QPointer< QObject > | m_childChangedFilter |
| const KoColorProfile * | m_rootSurfaceProfile {nullptr} |
| QMetaObject::Connection | m_surfaceManagerConnection |
| QPointer< QWindow > | m_topLevelNativeWindow |
| QPointer< KisSRGBSurfaceColorSpaceManager > | m_topLevelSurfaceManager |
| QPointer< QWidget > | m_topLevelWidgetWithSurface |
| QWidget * | m_watched {nullptr} |
| QVector< QPointer< QObject > > | m_watchedHierarchy |
KisRootSurfaceInfoProxy is a special proxy object for the surface color management information of the widget.
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) Finds KisSRGBSurfaceColorSpaceManager object attached to this window. This object is usually attached with an event filter in KisApplication to all windows not having a special property (if the manager is not yet attached, tracks its addition by filtering QChildEvent)
4) Finally, connects to the manager and forwards its sigDisplayConfigChanged() to local sigRootSurfaceProfileChanged()
Definition at line 45 of file KisRootSurfaceInfoProxy.h.
| KisRootSurfaceInfoProxy::KisRootSurfaceInfoProxy | ( | QWidget * | watched, |
| QObject * | parent = nullptr ) |
Definition at line 50 of file KisRootSurfaceInfoProxy.cpp.
References KoColorSpaceRegistry::instance(), KisPlatformPluginInterfaceFactory::instance(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_rootSurfaceProfile, KoColorSpaceRegistry::p709SRGBProfile(), and tryUpdateHierarchy().
| KisRootSurfaceInfoProxy::~KisRootSurfaceInfoProxy | ( | ) |
Definition at line 59 of file KisRootSurfaceInfoProxy.cpp.
| QString KisRootSurfaceInfoProxy::colorManagementReport | ( | ) | const |
Definition at line 73 of file KisRootSurfaceInfoProxy.cpp.
References m_topLevelSurfaceManager.
|
overrideprivate |
Definition at line 85 of file KisRootSurfaceInfoProxy.cpp.
References m_watchedHierarchy, tryReconnectSurfaceManager(), and tryUpdateHierarchy().
|
private |
Definition at line 182 of file KisRootSurfaceInfoProxy.cpp.
| bool KisRootSurfaceInfoProxy::isReady | ( | ) | const |
Definition at line 68 of file KisRootSurfaceInfoProxy.cpp.
References m_topLevelSurfaceManager.
| QString KisRootSurfaceInfoProxy::osPreferredColorSpaceReport | ( | ) | const |
Definition at line 79 of file KisRootSurfaceInfoProxy.cpp.
References m_topLevelSurfaceManager.
|
private |
Definition at line 194 of file KisRootSurfaceInfoProxy.cpp.
References KIS_SAFE_ASSERT_RECOVER, and m_watchedHierarchy.
| const KoColorProfile * KisRootSurfaceInfoProxy::rootSurfaceProfile | ( | ) | const |
Definition at line 63 of file KisRootSurfaceInfoProxy.cpp.
References m_rootSurfaceProfile.
|
signal |
|
private |
Definition at line 111 of file KisRootSurfaceInfoProxy.cpp.
References connect(), m_childChangedFilter, m_surfaceManagerConnection, m_topLevelNativeWindow, m_topLevelSurfaceManager, m_topLevelWidgetWithSurface, KisCanvasSurfaceColorSpaceManager::sigDisplayConfigChanged(), tryReconnectSurfaceManager(), and tryUpdateRootSurfaceProfile().
|
private |
Definition at line 98 of file KisRootSurfaceInfoProxy.cpp.
References getCurrentHierarchy(), m_topLevelWidgetWithSurface, m_watched, m_watchedHierarchy, reconnectToHierarchy(), and tryReconnectSurfaceManager().
|
private |
Definition at line 166 of file KisRootSurfaceInfoProxy.cpp.
References KoColorSpaceRegistry::instance(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_rootSurfaceProfile, m_topLevelSurfaceManager, KoColorSpaceRegistry::p709SRGBProfile(), and sigRootSurfaceProfileChanged().
|
private |
Definition at line 79 of file KisRootSurfaceInfoProxy.h.
|
private |
Definition at line 84 of file KisRootSurfaceInfoProxy.h.
|
private |
Definition at line 82 of file KisRootSurfaceInfoProxy.h.
|
private |
Definition at line 78 of file KisRootSurfaceInfoProxy.h.
|
private |
Definition at line 81 of file KisRootSurfaceInfoProxy.h.
|
private |
Definition at line 76 of file KisRootSurfaceInfoProxy.h.
|
private |
Definition at line 73 of file KisRootSurfaceInfoProxy.h.
Definition at line 74 of file KisRootSurfaceInfoProxy.h.