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

#include <ExifCheck.h>

+ Inheritance diagram for ExifCheck:

Public Member Functions

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

Constructor & Destructor Documentation

◆ ExifCheck()

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

Definition at line 24 of file ExifCheck.h.

25 : KisExportCheckBase(id, level, customWarning)
26 {
27 if (customWarning.isEmpty()) {
28 m_warning = i18nc("image conversion warning", "The image contains <b>Exif</b> metadata. The metadata will not be saved.");
29 }
30 }
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.

References KisExportCheckBase::m_warning.

Member Function Documentation

◆ check()

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

Implements KisExportCheckBase.

Definition at line 39 of file ExifCheck.h.

40 {
41 return m_level;
42 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

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

Implements KisExportCheckBase.

Definition at line 32 of file ExifCheck.h.

33 {
35 eIV.visit(image->rootLayer().data());
36 return eIV.exifInfo();
37 }
The KisExifInfoVisitor class looks for a layer with metadata.
KisMetaData::Store * exifInfo()
bool visit(KisNode *) override
KisGroupLayerSP rootLayer() const

References KisSharedPtr< T >::data(), KisExifInfoVisitor::exifInfo(), KisImage::rootLayer(), and KisExifInfoVisitor::visit().


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