Overte C++ Documentation
DockWidget.h
1 //
2 // DockWidget.h
3 // libraries/ui/src
4 //
5 // Created by Dante Ruiz 05-07-2019
6 // Copyright 2019 High Fidelity, Inc.
7 //
8 // Distributed under the Apache License, Version 2.0.
9 // See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
10 //
11 
12 
13 #ifndef hifi_DockWidget_h
14 #define hifi_DockWidget_h
15 
16 #include <QDockWidget>
17 #include <memory>
18 
19 class QQuickView;
20 class QQuickItem;
21 class DockWidget : public QDockWidget {
22 Q_OBJECT
23 public:
24  DockWidget(const QString& title, QWidget* parent = nullptr);
25  ~DockWidget() = default;
26 
27  void setSource(const QUrl& url);
28  QQuickItem* getRootItem() const;
29  std::shared_ptr<QQuickView> getQuickView() const;
30 
31 signals:
32  void onResizeEvent();
33 
34 protected:
35  void resizeEvent(QResizeEvent* event) override;
36 
37 private:
38  std::shared_ptr<QQuickView> _quickView;
39 };
40 
41 #endif