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

#include <qml_export.h>

+ Inheritance diagram for QMLExport:

Public Member Functions

KisImportExportErrorCode convert (KisDocument *document, QIODevice *io, KisPropertiesConfigurationSP configuration=0) override
 
void initializeCapabilities () override
 
 QMLExport (QObject *parent, const QVariantList &)
 
 ~QMLExport () override
 
- Public Member Functions inherited from KisImportExportFilter
virtual KisConfigWidgetcreateConfigurationWidget (QWidget *parent, const QByteArray &from="", const QByteArray &to="") const
 createConfigurationWidget creates a widget that can be used to define the settings for a given import/export filter
 
virtual KisPropertiesConfigurationSP defaultConfiguration (const QByteArray &from="", const QByteArray &to="") const
 defaultConfiguration defines the default settings for the given import export filter
 
virtual QMap< QString, KisExportCheckBase * > exportChecks ()
 generate and return the list of capabilities of this export filter. The list
 
virtual bool exportSupportsGuides () const
 exportSupportsGuides Because guides are in the document and not the image, checking for guides cannot be made an exportCheck.
 
KisPropertiesConfigurationSP lastSavedConfiguration (const QByteArray &from="", const QByteArray &to="") const
 lastSavedConfiguration return the last saved configuration for this filter
 
 Private ()
 
void setBatchMode (bool batchmode)
 
void setFilename (const QString &filename)
 
void setImportUserFeedBackInterface (KisImportUserFeedbackInterface *interface)
 
void setMimeType (const QString &mime)
 
void setRealFilename (const QString &filename)
 
void setUpdater (QPointer< KoUpdater > updater)
 
virtual bool supportsIO () const
 Override and return false for the filters that use a library that cannot handle file handles, only file names.
 
QPointer< KoUpdaterupdater ()
 
virtual QString verify (const QString &fileName) const
 Verify whether the given file is correct and readable.
 
 ~KisImportExportFilter () override
 
 ~Private ()
 

Additional Inherited Members

- Public Attributes inherited from KisImportExportFilter
bool batchmode
 
QMap< QString, KisExportCheckBase * > capabilities
 
QString filename
 
KisImportUserFeedbackInterfaceimportUserFeedBackInterface {nullptr}
 
QByteArray mime
 
QString realFilename
 
QPointer< KoUpdaterupdater
 
- Static Public Attributes inherited from KisImportExportFilter
static const QString CICPPrimariesTag = "CICPCompatiblePrimaries"
 
static const QString CICPTransferCharacteristicsTag = "CICPCompatibleTransferFunction"
 
static const QString ColorDepthIDTag = "ColorDepthID"
 
static const QString ColorModelIDTag = "ColorModelID"
 
static const QString HDRTag = "HDRSupported"
 
static const QString ImageContainsTransparencyTag = "ImageContainsTransparency"
 
static const QString sRGBTag = "sRGB"
 
- Protected Member Functions inherited from KisImportExportFilter
void addCapability (KisExportCheckBase *capability)
 
void addSupportedColorModels (QList< QPair< KoID, KoID > > supportedColorModels, const QString &name, KisExportCheckBase::Level level=KisExportCheckBase::PARTIALLY)
 
bool batchMode () const
 
QString filename () const
 
KisImportUserFeedbackInterfaceimportUserFeedBackInterface () const
 
 KisImportExportFilter (QObject *parent=0)
 
QByteArray mimeType () const
 
QString realFilename () const
 
void setProgress (int value)
 
QString verifyZiPBasedFiles (const QString &fileName, const QStringList &filesToCheck) const
 

Detailed Description

Definition at line 14 of file qml_export.h.

Constructor & Destructor Documentation

◆ QMLExport()

QMLExport::QMLExport ( QObject * parent,
const QVariantList &  )

Definition at line 24 of file qml_export.cc.

24 : KisImportExportFilter(parent)
25{
26}
KisImportExportFilter(QObject *parent=0)

◆ ~QMLExport()

QMLExport::~QMLExport ( )
override

Definition at line 28 of file qml_export.cc.

29{
30}

Member Function Documentation

◆ convert()

KisImportExportErrorCode QMLExport::convert ( KisDocument * document,
QIODevice * io,
KisPropertiesConfigurationSP configuration = 0 )
overridevirtual

The filter chain calls this method to perform the actual conversion. The passed mimetypes should be a pair of those you specified in your .desktop file. You have to implement this method to make the filter work.

Returns
The error status, see the #ConversionStatus enum. KisImportExportFilter::OK means that everything is alright.

Implements KisImportExportFilter.

Definition at line 32 of file qml_export.cc.

33{
34 KisImageSP image = document->savingImage();
35 Q_CHECK_PTR(image);
36
37 QMLConverter converter;
38 return converter.buildFile(filename(), realFilename(), io, image);
39}
KisImportExportErrorCode buildFile(const QString &filename, const QString &realFilename, QIODevice *io, KisImageSP image)

References QMLConverter::buildFile(), KisImportExportFilter::filename, and KisImportExportFilter::realFilename.

◆ initializeCapabilities()

void QMLExport::initializeCapabilities ( )
overridevirtual

Reimplemented from KisImportExportFilter.

Definition at line 41 of file qml_export.cc.

42{
45
46 QList<QPair<KoID, KoID> > supportedColorModels;
47 supportedColorModels << QPair<KoID, KoID>()
48 << QPair<KoID, KoID>(RGBAColorModelID, Integer8BitsColorDepthID)
49 << QPair<KoID, KoID>(GrayAColorModelID, Integer8BitsColorDepthID);
50 addSupportedColorModels(supportedColorModels, "QML");
51 }
VertexDescriptor get(PredecessorMap const &m, VertexDescriptor v)
const KoID GrayAColorModelID("GRAYA", ki18n("Grayscale/Alpha"))
const KoID Integer8BitsColorDepthID("U8", ki18n("8-bit integer/channel"))
const KoID RGBAColorModelID("RGBA", ki18n("RGB/Alpha"))
static KisExportCheckRegistry * instance()
void addSupportedColorModels(QList< QPair< KoID, KoID > > supportedColorModels, const QString &name, KisExportCheckBase::Level level=KisExportCheckBase::PARTIALLY)
void addCapability(KisExportCheckBase *capability)
QPainterPath create(const char32_t codepoint, double height)
Creates a tofu missing glyph indicator representing the provided Unicode codepoint.

References KisImportExportFilter::addCapability(), KisImportExportFilter::addSupportedColorModels(), get(), GrayAColorModelID, KisExportCheckRegistry::instance(), Integer8BitsColorDepthID, RGBAColorModelID, and KisExportCheckBase::SUPPORTED.


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