Krita Source Code Documentation
Loading...
Searching...
No Matches
KisRootSurfaceInfoProxy.cpp
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2025 Dmitry Kazakov <dimula73@gmail.com>
3 *
4 * SPDX-License-Identifier: GPL-2.0-or-later
5 */
6
8
9#include <QTimer>
10
11#include <QEvent>
12#include <QWidget>
13#include <QWindow>
16
17
18KisRootSurfaceInfoProxy::KisRootSurfaceInfoProxy(QWidget *watched, QObject *parent)
19 : KisRootSurfaceTrackerBase(watched, parent)
20{
23 // WARNING: we potentially call virtual functions here!
24 initialize();
25}
26
30
35
40
42{
43 return m_topLevelSurfaceManager ? m_topLevelSurfaceManager->colorManagementReport()
44 : QString("Top level surface color manager is not found!\n");
45}
46
48{
49 return m_topLevelSurfaceManager ? m_topLevelSurfaceManager->osPreferredColorSpaceReport()
50 : QString("Top level surface color manager is not found!\n");
51}
52
71
80
82{
84
86 newProfile = m_topLevelSurfaceManager->displayConfig().profile;
87 }
88
90
91 if (newProfile != m_rootSurfaceProfile) {
92 m_rootSurfaceProfile = newProfile;
94 }
95}
static KisPlatformPluginInterfaceFactory * instance()
QMetaObject::Connection m_surfaceManagerConnection
QPointer< KisSRGBSurfaceColorSpaceManager > m_topLevelSurfaceManager
const KoColorProfile * m_rootSurfaceProfile
void connectToNativeWindow(QWindow *nativeWindow) override
KisRootSurfaceInfoProxy(QWidget *watched, QObject *parent=nullptr)
const KoColorProfile * rootSurfaceProfile() const
void sigRootSurfaceProfileChanged(const KoColorProfile *profile) const
#define KIS_SAFE_ASSERT_RECOVER_RETURN(cond)
Definition kis_assert.h:128
void sigDisplayConfigChanged(const KisDisplayConfig &config)
static KoColorSpaceRegistry * instance()
const KoColorProfile * p709SRGBProfile() const