Messagelib
10 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
11 #include <grantlee/node.h>
12 #include <grantlee/taglibraryinterface.h>
14 #include <KTextTemplate/node.h>
15 #include <KTextTemplate/taglibraryinterface.h>
20 namespace MessageViewer
22 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
23 using GrantleeCallback = std::function<void(Grantlee::OutputStream *)>;
25 using GrantleeCallback = std::function<void(KTextTemplate::OutputStream *)>;
28 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
29 class CallbackTag :
public Grantlee::Node
31 class CallbackTag :
public KTextTemplate::Node
36 explicit CallbackTag(
const QString &name,
QObject *parent =
nullptr);
37 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
38 void render(Grantlee::OutputStream *stream, Grantlee::Context *context)
const override;
40 void render(KTextTemplate::OutputStream *stream, KTextTemplate::Context *context)
const override;
47 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
48 class CallbackTagFactory :
public Grantlee::AbstractNodeFactory
50 class CallbackTagFactory :
public KTextTemplate::AbstractNodeFactory
55 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
56 Grantlee::Node *getNode(
const QString &tagContent, Grantlee::Parser *parser)
const override;
58 KTextTemplate::Node *getNode(
const QString &tagContent, KTextTemplate::Parser *parser)
const override;
61 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
62 class GrantleeTagLibrary :
public QObject,
public Grantlee::TagLibraryInterface
64 class GrantleeTagLibrary :
public QObject,
public KTextTemplate::TagLibraryInterface
68 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
73 Q_PLUGIN_METADATA(IID
"org.grantlee.TagLibraryInterface")
75 explicit GrantleeTagLibrary(
QObject *parent =
nullptr);
76 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
84 Q_DECLARE_METATYPE(MessageViewer::GrantleeCallback)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed May 25 2022 03:55:39 by
doxygen 1.8.17 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.