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

#include <ColorModelHomogenousCheck.h>

+ Inheritance diagram for ColorModelHomogenousCheck:

Public Member Functions

Level check (KisImageSP) const override
 
bool checkNeeded (KisImageSP image) const override
 
 ColorModelHomogenousCheck (const QString &id, Level level, const QString &customWarning=QString())
 
- Public Member Functions inherited from KisExportCheckBase
virtual QString id () const
 
 KisExportCheckBase (const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
 KisExportCheckBase.
 
virtual bool perLayerCheck () const
 
QString warning () const
 
virtual ~KisExportCheckBase ()
 

Additional Inherited Members

- Public Types inherited from KisExportCheckBase
enum  Level { SUPPORTED , PARTIALLY , UNSUPPORTED }
 
- Protected Attributes inherited from KisExportCheckBase
QString m_id
 
Level m_level {UNSUPPORTED}
 
bool m_perLayerCheck {false}
 
QString m_warning
 

Detailed Description

Definition at line 104 of file ColorModelHomogenousCheck.h.

Constructor & Destructor Documentation

◆ ColorModelHomogenousCheck()

ColorModelHomogenousCheck::ColorModelHomogenousCheck ( const QString & id,
Level level,
const QString & customWarning = QString() )
inline

Definition at line 108 of file ColorModelHomogenousCheck.h.

109 : KisExportCheckBase(id, level, customWarning, true)
110 {
111 if (customWarning.isEmpty()) {
112 m_warning = i18nc("image conversion warning", "Your image contains layers with a color model that is different from the image. The layers will be converted.");
113 }
114 }
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.

References KisExportCheckBase::m_warning.

Member Function Documentation

◆ check()

Level ColorModelHomogenousCheck::check ( KisImageSP image) const
inlineoverridevirtual
Returns
the level of support for this feature

Implements KisExportCheckBase.

Definition at line 124 of file ColorModelHomogenousCheck.h.

125 {
126 return m_level;
127 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

bool ColorModelHomogenousCheck::checkNeeded ( KisImageSP image) const
inlineoverridevirtual
Returns
whether the image uses this feature

Implements KisExportCheckBase.

Definition at line 116 of file ColorModelHomogenousCheck.h.

117 {
118 const KoColorSpace *cs = image->colorSpace();
120 image->rootLayer()->accept(v);
121 return (v.count() > 0);
122 }
qreal v
KisGroupLayerSP rootLayer() const
const KoColorSpace * colorSpace() const
virtual KoID colorModelId() const =0
virtual KoID colorDepthId() const =0
bool accept(KisNodeVisitor &v) override

References KisGroupLayer::accept(), KoColorSpace::colorDepthId(), KoColorSpace::colorModelId(), KisImage::colorSpace(), KisImage::rootLayer(), and v.


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