GrantleeTheme

grantleethemeengine.cpp
1 /*
2  Copyright (c) 2016 Daniel Vr├ítil <[email protected]>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Lesser General Public
6  License as published by the Free Software Foundation; either
7  version 2.1 of the License, or (at your option) any later version.
8 
9  This library is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  Lesser General Public License for more details.
13 
14  You should have received a copy of the GNU Lesser General Public
15  License along with this library; if not, write to the Free Software
16  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17 */
18 
19 #include "grantleethemeengine.h"
20 #include "grantleeki18nlocalizer.h"
21 
22 #include <config-grantleetheme.h>
23 
24 using namespace GrantleeTheme;
25 
26 class GrantleeTheme::EnginePrivate
27 {
28 public:
29  EnginePrivate()
30  {
31  }
32 
33  ~EnginePrivate()
34  {
35  }
36 
38 };
39 
40 Engine::Engine(QObject *parent)
41  : Grantlee::Engine(parent)
42  , d(new GrantleeTheme::EnginePrivate)
43 {
44  addPluginPath(QStringLiteral(GRANTLEE_PLUGIN_INSTALL_DIR));
45  addDefaultLibrary(QStringLiteral("grantlee_i18ntags"));
46  addDefaultLibrary(QStringLiteral("kde_grantlee_plugin"));
47  addDefaultLibrary(QStringLiteral("grantlee_scriptabletags"));
48  setSmartTrimEnabled(true);
49 }
50 
51 Engine::~Engine()
52 {
53  delete d;
54 }
55 
56 QSharedPointer<GrantleeKi18nLocalizer> Engine::localizer() const
57 {
58  auto loc = d->localizer.toStrongRef();
59  if (!loc) {
60  loc.reset(new GrantleeKi18nLocalizer());
61  d->localizer = loc.toWeakRef();
62  }
63  return loc;
64 }
The GrantleeKi18nLocalizer class.
The Engine class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Jul 9 2020 23:15:47 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.