KDEGames

kgdeclarativeview.h
1 /*
2  SPDX-FileCopyrightText: 2012 Viranch Mehta <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-only
5 */
6 
7 #ifndef KGDECLARATIVEVIEW_H
8 #define KGDECLARATIVEVIEW_H
9 
10 // own
11 #include <libkdegames_export.h>
12 // Qt
13 #include <QQuickWidget>
14 // Std
15 #include <memory>
16 
17 /**
18  * @class KgDeclarativeView
19  * @since 4.11
20  * @short A QDeclarativeView that adds KDE specific module paths and javascript bindings.
21  *
22  * This class is a QDeclarativeView that sets up a KDE specific environment
23  * like custom QML module paths and javascript function bindings (like i18n)
24  * to the declarative view.
25  *
26  * For porting KDE games to QML, the central widget of main window is to
27  * be replaced by KgDeclarativeView (inside which all the .qml graphics take
28  * place), leaving the toolbars, menubars and statusbars as they are, and
29  * updating their specifics via signals from QML to C++ part of the code.
30  */
31 class KDEGAMES_EXPORT KgDeclarativeView : public QQuickWidget
32 {
33  Q_OBJECT
34 public:
35  ///Construcs a new KgDeclarativeView with KDE specific environment.
36  ///@param parent The parent widget for this view (usually the main
37  ///window of the game)
38  explicit KgDeclarativeView(QWidget *parent=nullptr);
39  ~KgDeclarativeView() override;
40 
41 private:
42  std::unique_ptr<class KgDeclarativeViewPrivate> const d;
43 
44 };
45 
46 #endif //KGDECLARATIVEVIEW_H
A QDeclarativeView that adds KDE specific module paths and javascript bindings.
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Tue Dec 7 2021 22:34:15 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.