GrantleeTheme

kdegrantleeplugin.h
1 /*
2  * SPDX-FileCopyrightText: 2015 Daniel Vr├ítil <[email protected]>
3  *
4  * SPDX-License-Identifier: LGPL-2.1-or-later
5  *
6  */
7 
8 #pragma once
9 #include <QObject>
10 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
11 #include <grantlee/taglibraryinterface.h>
12 #else
13 #include <KTextTemplate/taglibraryinterface.h>
14 #endif
15 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
16 class KDEGrantleePlugin : public QObject, public Grantlee::TagLibraryInterface
17 #else
18 class KDEGrantleePlugin : public QObject, public KTextTemplate::TagLibraryInterface
19 #endif
20 {
21  Q_OBJECT
22 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
23  Q_INTERFACES(Grantlee::TagLibraryInterface)
24 #else
25  Q_INTERFACES(KTextTemplate::TagLibraryInterface)
26 #endif
27  Q_PLUGIN_METADATA(IID "org.kde.KDEGrantleePlugin")
28 
29 public:
30  explicit KDEGrantleePlugin(QObject *parent = nullptr);
31  ~KDEGrantleePlugin() override;
32 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
33  QHash<QString, Grantlee::Filter *> filters(const QString &name) override;
34  QHash<QString, Grantlee::AbstractNodeFactory *> nodeFactories(const QString &name) override;
35 #else
36  QHash<QString, KTextTemplate::Filter *> filters(const QString &name) override;
37  QHash<QString, KTextTemplate::AbstractNodeFactory *> nodeFactories(const QString &name) override;
38 #endif
39 };
40 
Q_OBJECTQ_OBJECT
Q_INTERFACES(...)
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Wed Sep 28 2022 04:06:59 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.