KItinerary::TextDocumentProcessor

Search for usage in LXR

KItinerary::TextDocumentProcessor Class Reference

#include <textdocumentprocessor.h>

Inheritance diagram for KItinerary::TextDocumentProcessor:

Public Member Functions

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

Processor for plain text documents.

Definition at line 14 of file textdocumentprocessor.h.

Member Function Documentation

◆ canHandleData()

bool TextDocumentProcessor::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 21 of file textdocumentprocessor.cpp.

◆ createNodeFromData()

ExtractorDocumentNode TextDocumentProcessor::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 27 of file textdocumentprocessor.cpp.

◆ matches()

bool TextDocumentProcessor::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 34 of file textdocumentprocessor.cpp.

◆ postExtract()

void TextDocumentProcessor::postExtract ( ExtractorDocumentNode & node,
const ExtractorEngine * engine ) const
overridevirtual

Called after extractors have been applied to node.

This can be used for applying document type specific data to the extracted result. The default implementation does nothing.

Reimplemented from KItinerary::ExtractorDocumentProcessor.

Definition at line 39 of file textdocumentprocessor.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 Mon Nov 4 2024 16:28:49 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.