Krita Source Code Documentation
Loading...
Searching...
No Matches
KisSRGBSurfaceColorSpaceManager.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 <QWidget>
10#include <QWindow>
11
12#include <kis_assert.h>
13#include <kis_config_notifier.h>
14
17
18
24
28
33
35{
36 QWindow *nativeWindow = widget->windowHandle();
37 KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(widget->windowHandle(), nullptr);
38
39 std::unique_ptr<KisSurfaceColorManagerInterface> iface(
40 KisPlatformPluginInterfaceFactory::instance()->createSurfaceColorManager(widget->windowHandle()));
41
42 if (iface) {
43 return new KisSRGBSurfaceColorSpaceManager(iface.release(), nativeWindow);
44 }
45
46 return nullptr;
47}
48
49#include <moc_KisSRGBSurfaceColorSpaceManager.cpp>
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
static KisConfigNotifier * instance()
void configChanged(void)
KisDisplayConfig This class keeps track of the color management configuration for image to display....
static Options optionsFromKisConfig(const KisConfig &cfg)
static KisPlatformPluginInterfaceFactory * instance()
KisSRGBSurfaceColorSpaceManager(KisSurfaceColorManagerInterface *interface, QObject *parent=nullptr)
static KisSRGBSurfaceColorSpaceManager * tryCreateForCurrentPlatform(QWidget *widget)
#define KIS_SAFE_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:129
void setDisplayConfigOptions(const KisConfig::CanvasSurfaceMode surfaceMode, const KisDisplayConfig::Options &options)