Krita Source Code Documentation
Loading...
Searching...
No Matches
KisWaylandAPIColorManager.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 KISWAYLANDAPICOLORMANAGER_H
7#define KISWAYLANDAPICOLORMANAGER_H
8
9#include <QWaylandClientExtension>
10#include <qwayland-color-management-v1.h>
11
12#include <QSet>
13
15 : public QWaylandClientExtensionTemplate<KisWaylandAPIColorManager, &QtWayland::wp_color_manager_v1::destroy>
16 , public QtWayland::wp_color_manager_v1
17{
18 Q_OBJECT
19public:
22
23 bool isReady() const {
24 return m_isReady;
25 }
26
27 bool isFeatureSupported(feature f) const
28 {
29 return m_supportedFeatures.contains(f);
30 }
31
32 bool isIntentSupported(render_intent ri) const
33 {
34 return m_supportedIntents.contains(ri);
35 }
36
37 bool isTransferFunctionNamedSupported(transfer_function tf) const
38 {
39 return m_supportedTransferFunctionsNamed.contains(tf);
40 }
41
42 bool isPrimariesNamedSupported(primaries p) const
43 {
44 return m_supportedPrimariesNamed.contains(p);
45 }
46
47Q_SIGNALS:
49
50protected:
51 void wp_color_manager_v1_supported_intent(uint32_t _render_intent) override;
52 void wp_color_manager_v1_supported_feature(uint32_t _feature) override;
53 void wp_color_manager_v1_supported_tf_named(uint32_t tf) override;
54 void wp_color_manager_v1_supported_primaries_named(uint32_t _primaries) override;
55 void wp_color_manager_v1_done() override;
56
57private:
58 QSet<render_intent> m_supportedIntents;
59 QSet<feature> m_supportedFeatures;
60 QSet<transfer_function> m_supportedTransferFunctionsNamed;
62 bool m_isReady {false};
63};
64
65#endif /* KISWAYLANDAPICOLORMANAGER_H */
float value(const T *src, size_t ch)
const Params2D p
void wp_color_manager_v1_supported_feature(uint32_t _feature) override
QSet< render_intent > m_supportedIntents
bool isIntentSupported(render_intent ri) const
bool isPrimariesNamedSupported(primaries p) const
void sigReadyChanged(bool value)
void wp_color_manager_v1_supported_primaries_named(uint32_t _primaries) override
bool isFeatureSupported(feature f) const
void wp_color_manager_v1_supported_tf_named(uint32_t tf) override
bool isTransferFunctionNamedSupported(transfer_function tf) const
QSet< transfer_function > m_supportedTransferFunctionsNamed
void wp_color_manager_v1_supported_intent(uint32_t _render_intent) override