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

#include <ExifCheck.h>

+ Inheritance diagram for TiffExifCheck:

Public Member Functions

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

Constructor & Destructor Documentation

◆ TiffExifCheck()

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

Definition at line 70 of file ExifCheck.h.

71 : KisExportCheckBase(id, level, customWarning)
72 {
73 if (customWarning.isEmpty()) {
74 m_warning = i18nc("image conversion warning",
75 "The image has <b>Exif</b> metadata and multiple layers. Only metadata <b>in the first "
76 "layer</b> will be saved.");
77 }
78 }
KisExportCheckBase(const QString &id, Level level, const QString &customWarning=QString(), bool perLayerCheck=false)
KisExportCheckBase.

References KisExportCheckBase::m_warning.

Member Function Documentation

◆ check()

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

Implements KisExportCheckBase.

Definition at line 88 of file ExifCheck.h.

89 {
90 return m_level;
91 }

References KisExportCheckBase::m_level.

◆ checkNeeded()

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

Implements KisExportCheckBase.

Definition at line 80 of file ExifCheck.h.

81 {
84 eIV.visit(image->rootLayer().data());
85 return eIV.exifInfo() && image->rootLayer()->childCount() > 1;
86 }
The KisExifInfoVisitor class looks for a layer with metadata.
KisMetaData::Store * exifInfo()
bool visit(KisNode *) override
KisGroupLayerSP rootLayer() const
#define KIS_ASSERT_RECOVER_RETURN_VALUE(cond, val)
Definition kis_assert.h:85
quint32 childCount() const
Definition kis_node.cpp:414

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


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