Krita Source Code Documentation
Loading...
Searching...
No Matches
KisExportCheckBase Class Referenceabstract

The KisExportCheckBase class defines the interface of the individual checks of an export filter's capabilities. More...

#include <KisExportCheckBase.h>

+ Inheritance diagram for KisExportCheckBase:

Public Types

enum  Level { SUPPORTED , PARTIALLY , UNSUPPORTED }
 

Public Member Functions

virtual Level check (KisImageSP image) const =0
 
virtual bool checkNeeded (KisImageSP image) const =0
 
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 ()
 

Protected Attributes

QString m_id
 
Level m_level {UNSUPPORTED}
 
bool m_perLayerCheck {false}
 
QString m_warning
 

Detailed Description

The KisExportCheckBase class defines the interface of the individual checks of an export filter's capabilities.

Definition at line 19 of file KisExportCheckBase.h.

Member Enumeration Documentation

◆ Level

The level determines the level of support the export filter has for the given feature.

Enumerator
SUPPORTED 
PARTIALLY 
UNSUPPORTED 

Definition at line 25 of file KisExportCheckBase.h.

25 {
26 SUPPORTED, //< The filter fully supports this
27 PARTIALLY, //< The filter can handle this, but the user needs to be warned about possible degradation
28 UNSUPPORTED //< This cannot be saved using this filter
29 };

Constructor & Destructor Documentation

◆ KisExportCheckBase()

KisExportCheckBase::KisExportCheckBase ( const QString & id,
Level level,
const QString & customWarning = QString(),
bool perLayerCheck = false )

KisExportCheckBase.

Parameters
levelthe level of support the filter has for the given feature
customWarningA custom warning to use instead of the default one

Definition at line 9 of file KisExportCheckBase.cpp.

10 : m_id(id)
11 , m_level(level)
12 , m_perLayerCheck(_perLayerCheck)
13{
14 if (!customWarning.isEmpty()) {
15 m_warning = customWarning;
16 }
17}

References m_warning.

◆ ~KisExportCheckBase()

KisExportCheckBase::~KisExportCheckBase ( )
virtual

Definition at line 19 of file KisExportCheckBase.cpp.

20{
21}

Member Function Documentation

◆ check()

◆ checkNeeded()

◆ id()

QString KisExportCheckBase::id ( ) const
virtual
Returns
the unique id of the check

Definition at line 23 of file KisExportCheckBase.cpp.

24{
25 return m_id;
26}

References m_id.

◆ perLayerCheck()

bool KisExportCheckBase::perLayerCheck ( ) const
virtual
Returns
true if this check is only relevant for file formats that can save multiple layers

Definition at line 28 of file KisExportCheckBase.cpp.

29{
30 return m_perLayerCheck;
31}

References m_perLayerCheck.

◆ warning()

QString KisExportCheckBase::warning ( ) const
Returns
the message to show the user

Definition at line 33 of file KisExportCheckBase.cpp.

34{
35 return m_warning;
36}

References m_warning.

Member Data Documentation

◆ m_id

QString KisExportCheckBase::m_id
protected

Definition at line 57 of file KisExportCheckBase.h.

◆ m_level

Level KisExportCheckBase::m_level {UNSUPPORTED}
protected

Definition at line 58 of file KisExportCheckBase.h.

◆ m_perLayerCheck

bool KisExportCheckBase::m_perLayerCheck {false}
protected

Definition at line 60 of file KisExportCheckBase.h.

60{false};

◆ m_warning

QString KisExportCheckBase::m_warning
protected

Definition at line 59 of file KisExportCheckBase.h.


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