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

#include <MultiLayerCheck.h>

+ Inheritance diagram for MultiLayerCheck:

Public Member Functions

Level check (KisImageSP) const override
 
bool checkNeeded (KisImageSP image) const override
 
 MultiLayerCheck (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 16 of file MultiLayerCheck.h.

Constructor & Destructor Documentation

◆ MultiLayerCheck()

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

Definition at line 20 of file MultiLayerCheck.h.

21 : KisExportCheckBase(id, level, customWarning)
22 {
23 if (customWarning.isEmpty()) {
24 m_warning = i18nc("image conversion warning", "The image has <b>more than one layer or a mask or an active selection</b>. Only the flattened image will be saved.");
25 }
26 }
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.

References KisExportCheckBase::m_warning.

Member Function Documentation

◆ check()

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

Implements KisExportCheckBase.

Definition at line 33 of file MultiLayerCheck.h.

34 {
35 return m_level;
36 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

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

Implements KisExportCheckBase.

Definition at line 28 of file MultiLayerCheck.h.

29 {
30 return (image->rootLayer()->childCount() > 1);
31 }
KisGroupLayerSP rootLayer() const
quint32 childCount() const
Definition kis_node.cpp:414

References KisNode::childCount(), and KisImage::rootLayer().


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