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

#include <AnimationCheck.h>

+ Inheritance diagram for AnimationCheck:

Public Member Functions

 AnimationCheck (const QString &id, Level level, const QString &customWarning=QString())
 
Level check (KisImageSP) const override
 
bool checkNeeded (KisImageSP image) const override
 
- 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 17 of file AnimationCheck.h.

Constructor & Destructor Documentation

◆ AnimationCheck()

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

Definition at line 21 of file AnimationCheck.h.

22 : KisExportCheckBase(id, level, customWarning, true)
23 {
24 if (customWarning.isEmpty()) {
25 m_warning = i18nc("image conversion warning", "This image has <b>animated layers</b>. Animation cannot be saved to this format.");
26 }
27 }
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.

References KisExportCheckBase::m_warning.

Member Function Documentation

◆ check()

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

Implements KisExportCheckBase.

Definition at line 34 of file AnimationCheck.h.

35 {
36 return m_level;
37 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

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

Implements KisExportCheckBase.

Definition at line 29 of file AnimationCheck.h.

30 {
31 return image->animationInterface()->hasAnimation();
32 }
KisImageAnimationInterface * animationInterface() const

References KisImage::animationInterface(), and KisImageAnimationInterface::hasAnimation().


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