Krita Source Code Documentation
Loading...
Searching...
No Matches
KisWaylandOutputColorInfo.h
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#ifndef KISWAYLANDOUTPUTCOLORINFO_H
7#define KISWAYLANDOUTPUTCOLORINFO_H
8
10
11#include <unordered_map>
12
15
17{
18 Q_OBJECT
19public:
20 KisWaylandOutputColorInfo(QObject *parent = nullptr);
22
23 bool isReady() const override;
24 std::optional<KisSurfaceColorimetry::SurfaceDescription> outputDescription(const QScreen *screen) const override;
25
26private:
27 void reinitialize();
28 void initScreenConnection(QScreen *screen);
29 void slotScreenAdded(QScreen *screen);
30 void slotScreenRemoved(QScreen *screen);
31
32 void setReadyImpl(bool value);
33 bool checkIfAllReady() const;
34
35private:
36 std::shared_ptr<KisWaylandAPIColorManager> m_waylandManager;
37 std::unordered_map<const QScreen*, std::unique_ptr<KisWaylandAPIOutput>> m_waylandOutputs;
38 bool m_isReady {false};
39};
40
41#endif /* KISWAYLANDOUTPUTCOLORINFO_H */
float value(const T *src, size_t ch)
std::unordered_map< const QScreen *, std::unique_ptr< KisWaylandAPIOutput > > m_waylandOutputs
std::optional< KisSurfaceColorimetry::SurfaceDescription > outputDescription(const QScreen *screen) const override
std::shared_ptr< KisWaylandAPIColorManager > m_waylandManager
KisWaylandOutputColorInfo(QObject *parent=nullptr)
void initScreenConnection(QScreen *screen)