Krita Source Code Documentation
Loading...
Searching...
No Matches
KisWaylandAPIColorManager Class Reference

#include <KisWaylandAPIColorManager.h>

+ Inheritance diagram for KisWaylandAPIColorManager:

Signals

void sigReadyChanged (bool value)
 

Public Member Functions

bool isFeatureSupported (feature f) const
 
bool isIntentSupported (render_intent ri) const
 
bool isPrimariesNamedSupported (primaries p) const
 
bool isReady () const
 
bool isTransferFunctionNamedSupported (transfer_function tf) const
 
 KisWaylandAPIColorManager ()
 
 ~KisWaylandAPIColorManager ()
 

Protected Member Functions

void wp_color_manager_v1_done () override
 
void wp_color_manager_v1_supported_feature (uint32_t _feature) override
 
void wp_color_manager_v1_supported_intent (uint32_t _render_intent) override
 
void wp_color_manager_v1_supported_primaries_named (uint32_t _primaries) override
 
void wp_color_manager_v1_supported_tf_named (uint32_t tf) override
 

Private Attributes

bool m_isReady {false}
 
QSet< feature > m_supportedFeatures
 
QSet< render_intent > m_supportedIntents
 
QSet< primaries > m_supportedPrimariesNamed
 
QSet< transfer_function > m_supportedTransferFunctionsNamed
 

Detailed Description

Definition at line 14 of file KisWaylandAPIColorManager.h.

Constructor & Destructor Documentation

◆ KisWaylandAPIColorManager()

KisWaylandAPIColorManager::KisWaylandAPIColorManager ( )
explicit

Definition at line 11 of file KisWaylandAPIColorManager.cpp.

12 : QWaylandClientExtensionTemplate(1)
13{
14 connect(this, &QWaylandClientExtensionTemplate::activeChanged, this, [this] {
15 if (!isActive()) {
16 m_supportedFeatures.clear();
17 m_supportedIntents.clear();
20 if (m_isReady) {
21 m_isReady = false;
23 }
24 }
25 });
26}
connect(this, SIGNAL(optionsChanged()), this, SLOT(saveOptions()))
QSet< render_intent > m_supportedIntents
void sigReadyChanged(bool value)
QSet< transfer_function > m_supportedTransferFunctionsNamed

References connect(), m_isReady, m_supportedFeatures, m_supportedIntents, m_supportedPrimariesNamed, m_supportedTransferFunctionsNamed, and sigReadyChanged().

◆ ~KisWaylandAPIColorManager()

KisWaylandAPIColorManager::~KisWaylandAPIColorManager ( )

Definition at line 28 of file KisWaylandAPIColorManager.cpp.

29{
30 // the destruction of the member object is automatically handled
31 // be the extension template class (thanks to the second template
32 // parameter)
33}

Member Function Documentation

◆ isFeatureSupported()

bool KisWaylandAPIColorManager::isFeatureSupported ( feature f) const
inline

Definition at line 27 of file KisWaylandAPIColorManager.h.

28 {
29 return m_supportedFeatures.contains(f);
30 }

References m_supportedFeatures.

◆ isIntentSupported()

bool KisWaylandAPIColorManager::isIntentSupported ( render_intent ri) const
inline

Definition at line 32 of file KisWaylandAPIColorManager.h.

33 {
34 return m_supportedIntents.contains(ri);
35 }

References m_supportedIntents.

◆ isPrimariesNamedSupported()

bool KisWaylandAPIColorManager::isPrimariesNamedSupported ( primaries p) const
inline

Definition at line 42 of file KisWaylandAPIColorManager.h.

43 {
44 return m_supportedPrimariesNamed.contains(p);
45 }
const Params2D p

References m_supportedPrimariesNamed, and p.

◆ isReady()

bool KisWaylandAPIColorManager::isReady ( ) const
inline

Definition at line 23 of file KisWaylandAPIColorManager.h.

23 {
24 return m_isReady;
25 }

References m_isReady.

◆ isTransferFunctionNamedSupported()

bool KisWaylandAPIColorManager::isTransferFunctionNamedSupported ( transfer_function tf) const
inline

Definition at line 37 of file KisWaylandAPIColorManager.h.

38 {
39 return m_supportedTransferFunctionsNamed.contains(tf);
40 }

References m_supportedTransferFunctionsNamed.

◆ sigReadyChanged

void KisWaylandAPIColorManager::sigReadyChanged ( bool value)
signal

◆ wp_color_manager_v1_done()

void KisWaylandAPIColorManager::wp_color_manager_v1_done ( )
overrideprotected

Definition at line 51 of file KisWaylandAPIColorManager.cpp.

52{
53 if (m_isReady) {
54 qWarning() << "WARNING: KisWaylandAPIColorManager::wp_color_manager_v1_done(): done event arrived while ready is true";
55 }
56
57 m_isReady = true;
59}

References m_isReady, and sigReadyChanged().

◆ wp_color_manager_v1_supported_feature()

void KisWaylandAPIColorManager::wp_color_manager_v1_supported_feature ( uint32_t _feature)
overrideprotected

Definition at line 39 of file KisWaylandAPIColorManager.cpp.

40{
41 m_supportedFeatures.insert(static_cast<feature>(_feature));
42}

References m_supportedFeatures.

◆ wp_color_manager_v1_supported_intent()

void KisWaylandAPIColorManager::wp_color_manager_v1_supported_intent ( uint32_t _render_intent)
overrideprotected

Definition at line 35 of file KisWaylandAPIColorManager.cpp.

36{
37 m_supportedIntents.insert(static_cast<render_intent>(_render_intent));
38}

References m_supportedIntents.

◆ wp_color_manager_v1_supported_primaries_named()

void KisWaylandAPIColorManager::wp_color_manager_v1_supported_primaries_named ( uint32_t _primaries)
overrideprotected

Definition at line 47 of file KisWaylandAPIColorManager.cpp.

48{
49 m_supportedPrimariesNamed.insert(static_cast<primaries>(_primaries));
50}

References m_supportedPrimariesNamed.

◆ wp_color_manager_v1_supported_tf_named()

void KisWaylandAPIColorManager::wp_color_manager_v1_supported_tf_named ( uint32_t tf)
overrideprotected

Definition at line 43 of file KisWaylandAPIColorManager.cpp.

44{
45 m_supportedTransferFunctionsNamed.insert(static_cast<transfer_function>(tf));
46}

References m_supportedTransferFunctionsNamed.

Member Data Documentation

◆ m_isReady

bool KisWaylandAPIColorManager::m_isReady {false}
private

Definition at line 62 of file KisWaylandAPIColorManager.h.

62{false};

◆ m_supportedFeatures

QSet<feature> KisWaylandAPIColorManager::m_supportedFeatures
private

Definition at line 59 of file KisWaylandAPIColorManager.h.

◆ m_supportedIntents

QSet<render_intent> KisWaylandAPIColorManager::m_supportedIntents
private

Definition at line 58 of file KisWaylandAPIColorManager.h.

◆ m_supportedPrimariesNamed

QSet<primaries> KisWaylandAPIColorManager::m_supportedPrimariesNamed
private

Definition at line 61 of file KisWaylandAPIColorManager.h.

◆ m_supportedTransferFunctionsNamed

QSet<transfer_function> KisWaylandAPIColorManager::m_supportedTransferFunctionsNamed
private

Definition at line 60 of file KisWaylandAPIColorManager.h.


The documentation for this class was generated from the following files: