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

#include <LayerOpacityCheck.h>

+ Inheritance diagram for LayerOpacityCheck:

Public Member Functions

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

Constructor & Destructor Documentation

◆ LayerOpacityCheck()

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

Definition at line 103 of file LayerOpacityCheck.h.

104 : KisExportCheckBase(id, level, customWarning, true)
105 {
106 if (customWarning.isEmpty()) {
107 m_warning = i18nc(
108 "image conversion warning",
109 "Your image contains layers with a partial opacity. The layers will be exported at full opacity.");
110 }
111 }
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.

References KisExportCheckBase::m_warning.

Member Function Documentation

◆ check()

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

Implements KisExportCheckBase.

Definition at line 120 of file LayerOpacityCheck.h.

121 {
122 return m_level;
123 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

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

Implements KisExportCheckBase.

Definition at line 113 of file LayerOpacityCheck.h.

114 {
116 image->rootLayer()->accept(v);
117 return (v.count() > 0);
118 }
qreal v
KisGroupLayerSP rootLayer() const
bool accept(KisNodeVisitor &v) override

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


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