Overte C++ Documentation
QmlOverlay.h
1 //
2 // Created by Bradley Austin Davis on 2016/01/27
3 // Copyright 2013-2016 High Fidelity, Inc.
4 //
5 // Distributed under the Apache License, Version 2.0.
6 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
7 //
8 
9 #ifndef hifi_QmlOverlay_h
10 #define hifi_QmlOverlay_h
11 
12 #include "Overlay2D.h"
13 
14 class QQuickItem;
15 
16 class QmlOverlay : public Overlay2D {
17  Q_OBJECT
18 
19 public:
20  QmlOverlay(const QUrl& url);
21  QmlOverlay(const QUrl& url, const QmlOverlay* overlay);
22  ~QmlOverlay();
23 
24  void setProperties(const QVariantMap& properties) override;
25  void render(RenderArgs* args) override {}
26 
27 private:
28  Q_INVOKABLE void qmlElementDestroyed();
29  Q_INVOKABLE void buildQmlElement(const QUrl& url);
30 
31 protected:
32  QQuickItem* _qmlElement { nullptr };
33 };
34 
35 #endif // hifi_QmlOverlay_h