KDeclarative

kdeclarative.h
1 /*
2  SPDX-FileCopyrightText: 2011 Marco Martin <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KDECLARATIVE_H
8 #define KDECLARATIVE_H
9 
10 #include <QQmlEngine>
11 
12 #include <kdeclarative/kdeclarative_export.h>
13 
14 #include <QStringList>
15 
16 class QQmlEngine;
17 
18 namespace KDeclarative {
19 
20 class KDeclarativePrivate;
21 
56 class KDECLARATIVE_EXPORT KDeclarative
57 {
58 public:
59  explicit KDeclarative();
60  ~KDeclarative();
61 
62  KDeclarative(const KDeclarative &) = delete;
63  KDeclarative &operator=(const KDeclarative &) = delete;
64 
65 #if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 0)
66 
69  KDECLARATIVE_DEPRECATED_VERSION(5, 0, "Is a no-op")
70  void initialize();
71 #endif
72 
73 #if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 45)
74 
79  KDECLARATIVE_DEPRECATED_VERSION(5, 45, "Call setupContext() and setupEngine() independently")
80  void setupBindings();
81 #endif
82 
83 #if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 75)
84 
91  KDECLARATIVE_DEPRECATED_VERSION_BELATED(5, 75, 5, 17, "set KLocalizedContext directly, see documentation in KI18n::KLocalizedContext")
92  void setupContext();
93 #endif
94 
109  void setDeclarativeEngine(QQmlEngine *engine);
116  QQmlEngine *declarativeEngine() const;
117 
118 #if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 75)
119 
136  KDECLARATIVE_DEPRECATED_VERSION_BELATED(5, 75, 5, 17, "set via KLocalizedContext::setTranslationDomain")
137  void setTranslationDomain(const QString &translationDomain);
138 #endif
139 
140 #if KDECLARATIVE_ENABLE_DEPRECATED_SINCE(5, 75)
141 
146  KDECLARATIVE_DEPRECATED_VERSION_BELATED(5, 75, 5, 17, "available via KLocalizedContext::translationDomain")
147  QString translationDomain() const;
148 #endif
149 
156  static void setupQmlJsDebugger();
157 
165  static QStringList runtimePlatform();
166 
172  static void setRuntimePlatform(const QStringList &platform);
173 
178  static QString componentsTarget();
179 
185  static QString defaultComponentsTarget();
186 
202  static void setupEngine(QQmlEngine *engine);
203 
204 private:
205  KDeclarativePrivate *const d;
206  friend class QmlObject;
207 };
208 
209 }
210 
211 #endif
An object that instantiates an entire QML context, with its own declarative engine.
Definition: qmlobject.h:38
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Jan 25 2021 22:44:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.