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

#include <FillLayerTypeCheck.h>

+ Inheritance diagram for FillLayerTypeCheck:

Public Member Functions

Level check (KisImageSP) const override
 
bool checkNeeded (KisImageSP image) const override
 
 FillLayerTypeCheck (const QString &generatorID, 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 ()
 

Public Attributes

const QString m_fillLayerID
 

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 82 of file FillLayerTypeCheck.h.

Constructor & Destructor Documentation

◆ FillLayerTypeCheck()

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

Definition at line 86 of file FillLayerTypeCheck.h.

87 : KisExportCheckBase(id, level, customWarning),
88 m_fillLayerID(generatorID)
89 {
90 if (customWarning.isEmpty()) {
91 QString name = KisGeneratorRegistry::instance()->get(generatorID)->name();
92 m_warning = i18nc("image conversion warning", "The image contains a Fill Layer of type <b>%1</b>, which is not supported, the layer will be converted to a paintlayer", name);
93 }
94 }
const QString m_fillLayerID
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.
static KisGeneratorRegistry * instance()
T get(const QString &id) const
const char * name(StandardAction id)

References KoGenericRegistry< T >::get(), KisGeneratorRegistry::instance(), KisExportCheckBase::m_warning, and KisBaseProcessor::name().

Member Function Documentation

◆ check()

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

Implements KisExportCheckBase.

Definition at line 103 of file FillLayerTypeCheck.h.

104 {
105 return m_level;
106 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

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

Implements KisExportCheckBase.

Definition at line 96 of file FillLayerTypeCheck.h.

97 {
99 image->rootLayer()->accept(v);
100 return (v.count() > 0);
101 }
qreal v
KisGroupLayerSP rootLayer() const
bool accept(KisNodeVisitor &v) override

References KisGroupLayer::accept(), m_fillLayerID, KisImage::rootLayer(), and v.

Member Data Documentation

◆ m_fillLayerID

const QString FillLayerTypeCheck::m_fillLayerID

Definition at line 108 of file FillLayerTypeCheck.h.


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