From 6412c272139678324b3f00213fed1c72b40032ef Mon Sep 17 00:00:00 2001 From: Florian Blume Date: Tue, 8 Sep 2020 14:33:32 +0200 Subject: [PATCH] Added installs dirictive --- qt3d-widget/include/qt3dwidget.h | 62 ++++++++++++++++++++++++++++++++ qt3d-widget/qt3d-widget.pro | 5 +++ 2 files changed, 67 insertions(+) create mode 100644 qt3d-widget/include/qt3dwidget.h diff --git a/qt3d-widget/include/qt3dwidget.h b/qt3d-widget/include/qt3dwidget.h new file mode 100644 index 0000000..ee7bbba --- /dev/null +++ b/qt3d-widget/include/qt3dwidget.h @@ -0,0 +1,62 @@ +#ifndef QT3DWIDGET_H +#define QT3DWIDGET_H + + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#if defined(QT3DWIDGETLIB_LIBRARY) +# define QT3DWIDGETLIB_EXPORT Q_DECL_EXPORT +#else +# define QT3DWIDGETLIB_EXPORT Q_DECL_IMPORT +#endif + +class Qt3DWidgetPrivate; + +class QT3DWIDGETLIB_EXPORT Qt3DWidget : public QOpenGLWidget { + Q_OBJECT + +public: + explicit Qt3DWidget(QWidget *parent = nullptr); + ~Qt3DWidget(); + void initializeGL() override; + void resizeGL(int w, int h) override; + + void registerAspect(Qt3DCore::QAbstractAspect *aspect); + void registerAspect(const QString &name); + + void setUpdateFrequency(int milliseconds); + + void setRootEntity(Qt3DCore::QEntity *root); + + void setActiveFrameGraph(Qt3DRender::QFrameGraphNode *activeFrameGraph); + Qt3DRender::QFrameGraphNode *activeFrameGraph() const; + Qt3DExtras::QForwardRenderer *defaultFrameGraph() const; + + Qt3DRender::QCamera *camera() const; + Qt3DRender::QRenderSettings *renderSettings() const; + + QSurface *surface() const; + +public Q_SLOTS: + void paintGL() override; + +Q_SIGNALS: + +protected: + Qt3DWidgetPrivate *d_ptr; + +private: + Q_DECLARE_PRIVATE(Qt3DWidget) + +}; + +#endif // QT3DWIDGET_H diff --git a/qt3d-widget/qt3d-widget.pro b/qt3d-widget/qt3d-widget.pro index 4727a04..ddc4776 100644 --- a/qt3d-widget/qt3d-widget.pro +++ b/qt3d-widget/qt3d-widget.pro @@ -7,6 +7,11 @@ CONFIG += c++11 shared_and_static build_all DEFINES += QT3DWIDGETLIB_LIBRARY +public_headers.path = include +public_headers.files = include/*.h + +INSTALLS += public_headers + DESTDIR += ../../../lib SOURCES += \