KItinerary
extractorfilter.cpp
102 return !d->m_mimeType.isEmpty() && (!d->m_fieldName.isEmpty() || !needsFieldName(d->m_mimeType)) && d->m_exp.isValid();
157static bool filterMachesNode(const ExtractorFilter &filter, ExtractorFilter::Scope scope, const ExtractorDocumentNode &node,
165 if (filter.mimeType() == node.mimeType() && ((filter.fieldName().isEmpty() && filter.pattern().isEmpty()) || node.processor()->matches(filter, node))) {
207 const auto m = filterMachesNode(filter, ExtractorFilter::Descendants, child, matches, matchMode);
230 if (filterMachesNode(*this, d->m_scope == ExtractorFilter::Descendants ? d->m_scope : ExtractorFilter::Current, child, matches, Any)) {
238void ExtractorFilter::allMatches(const ExtractorDocumentNode &node, std::vector<ExtractorDocumentNode>& matches) const
253 filterMachesNode(*this, d->m_scope == ExtractorFilter::Descendants ? d->m_scope : ExtractorFilter::Current, child, matches, All);
A node in the extracted document object tree.
Definition extractordocumentnode.h:50
KItinerary::ExtractorDocumentNode parent
The parent node, or a null node if this is the root node.
Definition extractordocumentnode.h:55
Determines whether an extractor is applicable to a given email.
Definition extractorfilter.h:24
QString mimeType() const
MIME type of the document part this filter can match.
Definition extractorfilter.cpp:42
void allMatches(const ExtractorDocumentNode &node, std::vector< ExtractorDocumentNode > &matches) const
Checks whether this filter applies to node.
Definition extractorfilter.cpp:238
bool matches(const QString &data) const
Check if data matches this filter.
Definition extractorfilter.cpp:64
Scope
Specifies which document nodes should match this filter, relative to the one being extracted.
Definition extractorfilter.h:44
Scope scope() const
Evaluation scope of this filter, in relation to the node being extracted.
Definition extractorfilter.cpp:131
char * toString(const EngineQuery &query)
Classes for reservation/travel data models, data extraction and data augmentation.
Definition berelement.h:17
const char * constData() const const
bool isEmpty() const const
iterator insert(QLatin1StringView key, const QJsonValue &value)
QJsonValue value(QLatin1StringView key) const const
bool isObject() const const
bool isString() const const
QJsonObject toObject() const const
QString toString() const const
QJSValue property(const QString &name) const const
QMetaEnum fromType()
QByteArray toUtf8() const const
QList< QStringView > split(QChar sep, Qt::SplitBehavior behavior, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:28:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.