KItinerary::MimeDocumentProcessor

Search for usage in LXR

KItinerary::MimeDocumentProcessor Class Reference

#include <mimedocumentprocessor.h>

Inheritance diagram for KItinerary::MimeDocumentProcessor:

Public Member Functions

bool canHandleData (const QByteArray &encodedData, QStringView fileName) const override
 
ExtractorDocumentNode createNodeFromContent (const QVariant &decodedData) const override
 
ExtractorDocumentNode createNodeFromData (const QByteArray &encodedData) const override
 
void destroyNode (ExtractorDocumentNode &node) const override
 
void expandNode (ExtractorDocumentNode &node, const ExtractorEngine *engine) const override
 
bool matches (const ExtractorFilter &filter, const ExtractorDocumentNode &node) const override
 
- Public Member Functions inherited from KItinerary::ExtractorDocumentProcessor
virtual QJSValue contentToScriptValue (const ExtractorDocumentNode &node, QJSEngine *engine) const
 
virtual void postExtract (ExtractorDocumentNode &node, const ExtractorEngine *engine) const
 
virtual void preExtract (ExtractorDocumentNode &node, const ExtractorEngine *engine) const
 
virtual void reduceNode (ExtractorDocumentNode &node) const
 

Additional Inherited Members

- Protected Member Functions inherited from KItinerary::ExtractorDocumentProcessor
template<typename T >
void destroyIfOwned (ExtractorDocumentNode &node) const
 
- Static Protected Member Functions inherited from KItinerary::ExtractorDocumentProcessor
static bool matchesGadget (const ExtractorFilter &filter, const QMetaObject *mo, const void *obj)
 
template<typename T >
static bool matchesGadget (const ExtractorFilter &filter, const T *obj)
 

Detailed Description

MIME document processor.

Definition at line 14 of file mimedocumentprocessor.h.

Member Function Documentation

◆ canHandleData()

bool MimeDocumentProcessor::canHandleData ( const QByteArray & encodedData,
QStringView fileName ) const
overridevirtual

Fast check whether the given encoded data can possibly be processed by this instance.

The default implementation returns false, relying on QMimeDatabase for detection.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 60 of file mimedocumentprocessor.cpp.

◆ createNodeFromContent()

ExtractorDocumentNode MimeDocumentProcessor::createNodeFromContent ( const QVariant & decodedData) const
overridevirtual

Create a document node from an already decoded data type.

The default implementation just sets decodedData on the resulting node.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 88 of file mimedocumentprocessor.cpp.

◆ createNodeFromData()

ExtractorDocumentNode MimeDocumentProcessor::createNodeFromData ( const QByteArray & encodedData) const
overridevirtual

Create a document node from raw data.

The default implementation produces in invalid node.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 67 of file mimedocumentprocessor.cpp.

◆ destroyNode()

void MimeDocumentProcessor::destroyNode ( ExtractorDocumentNode & node) const
overridevirtual

Destroys type-specific data in node.

The default implementation does nothing.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 191 of file mimedocumentprocessor.cpp.

◆ expandNode()

void MimeDocumentProcessor::expandNode ( ExtractorDocumentNode & node,
const ExtractorEngine * engine ) const
overridevirtual

Create child nodes for node, as far as that's necessary for this document type.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 178 of file mimedocumentprocessor.cpp.

◆ matches()

bool MimeDocumentProcessor::matches ( const ExtractorFilter & filter,
const ExtractorDocumentNode & node ) const
overridevirtual

Checks whether the given filter matches node.

The default implementation can handle QObject and Q_GADGET types via Qt's property system.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 184 of file mimedocumentprocessor.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:00:34 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.