GrantleeTheme

qtresourcetemplateloader.h
1 /*
2  * SPDX-FileCopyrightText: 2016-2022 Laurent Montel <[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/templateloader.h>
12 #else
13 #include <KTextTemplate/templateloader.h>
14 #endif
15 
16 #include "grantleetheme_export.h"
17 namespace GrantleeTheme
18 {
19 /**
20  * @brief The QtResourceTemplateLoader class
21  * @author Laurent montel <[email protected]>
22  */
23 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
24 class GRANTLEETHEME_EXPORT QtResourceTemplateLoader : public Grantlee::FileSystemTemplateLoader
25 #else
26 class GRANTLEETHEME_EXPORT QtResourceTemplateLoader : public KTextTemplate::FileSystemTemplateLoader
27 #endif
28 {
29 public:
30 #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
32  Q_REQUIRED_RESULT Grantlee::Template loadByName(const QString &fileName, const Grantlee::Engine *engine) const override;
33 #else
35  Q_REQUIRED_RESULT KTextTemplate::Template loadByName(const QString &fileName, const KTextTemplate::Engine *engine) const override;
36 #endif
37 
38  Q_REQUIRED_RESULT bool canLoadTemplate(const QString &name) const override;
39 };
40 }
The QtResourceTemplateLoader class.
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.