From fa49d149fe01fa2332c126cbfbfe3cde28ae1d38 Mon Sep 17 00:00:00 2001 From: Martin Dobias Date: Mon, 18 Dec 2023 12:07:17 +0100 Subject: [PATCH] sip fixes --- python/3d/3d_auto.sip | 1 + python/3d/auto_generated/qgs3dwindow.sip.in | 69 +++++++++++++++++++ python/PyQt6/3d/3d_auto.sip | 1 + .../3d/auto_generated/qgs3dwindow.sip.in | 69 +++++++++++++++++++ src/3d/qgs3dwindow.h | 14 ++-- 5 files changed, 150 insertions(+), 4 deletions(-) create mode 100644 python/3d/auto_generated/qgs3dwindow.sip.in create mode 100644 python/PyQt6/3d/auto_generated/qgs3dwindow.sip.in diff --git a/python/3d/3d_auto.sip b/python/3d/3d_auto.sip index 0beb533a446..1a7625b42a1 100644 --- a/python/3d/3d_auto.sip +++ b/python/3d/3d_auto.sip @@ -4,6 +4,7 @@ %Include auto_generated/qgs3dmapscene.sip %Include auto_generated/qgs3dmapsettings.sip %Include auto_generated/qgs3dtypes.sip +%Include auto_generated/qgs3dwindow.sip %Include auto_generated/qgsabstractvectorlayer3drenderer.sip %Include auto_generated/qgscameracontroller.sip %Include auto_generated/qgscamerapose.sip diff --git a/python/3d/auto_generated/qgs3dwindow.sip.in b/python/3d/auto_generated/qgs3dwindow.sip.in new file mode 100644 index 00000000000..dff9b2d8162 --- /dev/null +++ b/python/3d/auto_generated/qgs3dwindow.sip.in @@ -0,0 +1,69 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/3d/qgs3dwindow.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + + +class Qgs3DWindow : QWindow +{ +%Docstring(signature="appended") +qgs3dWindow is a convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS. + +.. note:: + + This is a port of qtwindow3d which does not set the default surface when initialized. + +.. note:: + + The default surface must be set before the construction of the QApplication when using shared OpenGL context. + +.. note:: + + This is required in order to use QT3d and QtWebEngine at the same time. + +.. versionadded:: 3.36 +%End + +%TypeHeaderCode +#include "qgs3dwindow.h" +%End + public: + + Qgs3DWindow(); +%Docstring +Constructor for Qgs3DWindow. +%End + + ~Qgs3DWindow(); + + + protected: + + virtual void showEvent( QShowEvent *e ); + +%Docstring +Manages the display events specified in e. +%End + + virtual void resizeEvent( QResizeEvent * ); + +%Docstring +Resets the aspect ratio of the 3D window. +%End + +}; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/3d/qgs3dwindow.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/python/PyQt6/3d/3d_auto.sip b/python/PyQt6/3d/3d_auto.sip index 0beb533a446..1a7625b42a1 100644 --- a/python/PyQt6/3d/3d_auto.sip +++ b/python/PyQt6/3d/3d_auto.sip @@ -4,6 +4,7 @@ %Include auto_generated/qgs3dmapscene.sip %Include auto_generated/qgs3dmapsettings.sip %Include auto_generated/qgs3dtypes.sip +%Include auto_generated/qgs3dwindow.sip %Include auto_generated/qgsabstractvectorlayer3drenderer.sip %Include auto_generated/qgscameracontroller.sip %Include auto_generated/qgscamerapose.sip diff --git a/python/PyQt6/3d/auto_generated/qgs3dwindow.sip.in b/python/PyQt6/3d/auto_generated/qgs3dwindow.sip.in new file mode 100644 index 00000000000..dff9b2d8162 --- /dev/null +++ b/python/PyQt6/3d/auto_generated/qgs3dwindow.sip.in @@ -0,0 +1,69 @@ +/************************************************************************ + * This file has been generated automatically from * + * * + * src/3d/qgs3dwindow.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ + + + + + + +class Qgs3DWindow : QWindow +{ +%Docstring(signature="appended") +qgs3dWindow is a convenience wrapper to simplify the creation of a 3D window ready to be used with QGIS. + +.. note:: + + This is a port of qtwindow3d which does not set the default surface when initialized. + +.. note:: + + The default surface must be set before the construction of the QApplication when using shared OpenGL context. + +.. note:: + + This is required in order to use QT3d and QtWebEngine at the same time. + +.. versionadded:: 3.36 +%End + +%TypeHeaderCode +#include "qgs3dwindow.h" +%End + public: + + Qgs3DWindow(); +%Docstring +Constructor for Qgs3DWindow. +%End + + ~Qgs3DWindow(); + + + protected: + + virtual void showEvent( QShowEvent *e ); + +%Docstring +Manages the display events specified in e. +%End + + virtual void resizeEvent( QResizeEvent * ); + +%Docstring +Resets the aspect ratio of the 3D window. +%End + +}; + +/************************************************************************ + * This file has been generated automatically from * + * * + * src/3d/qgs3dwindow.h * + * * + * Do not edit manually ! Edit header and run scripts/sipify.pl again * + ************************************************************************/ diff --git a/src/3d/qgs3dwindow.h b/src/3d/qgs3dwindow.h index 858f8e2e9bf..3948e7ee28d 100644 --- a/src/3d/qgs3dwindow.h +++ b/src/3d/qgs3dwindow.h @@ -16,9 +16,11 @@ #ifndef QGS3DWINDOW_H #define QGS3DWINDOW_H +#include "qgis_3d.h" + #include - +#ifndef SIP_RUN namespace Qt3DCore { class QAspectEngine; @@ -49,6 +51,8 @@ namespace Qt3DLogic { class QLogicAspect; } +#endif + /** * \ingroup 3d @@ -58,9 +62,9 @@ namespace Qt3DLogic * \note The default surface must be set before the construction of the QApplication when using shared OpenGL context. * \note This is required in order to use QT3d and QtWebEngine at the same time. * - * \since QGIS 3.32 + * \since QGIS 3.36 */ -class Qgs3DWindow : public QWindow +class _3D_EXPORT Qgs3DWindow : public QWindow { Q_OBJECT public: @@ -75,6 +79,8 @@ class Qgs3DWindow : public QWindow */ ~Qgs3DWindow(); +#ifndef SIP_RUN + /** * Sets the specified root entity of the scene. */ @@ -104,7 +110,7 @@ class Qgs3DWindow : public QWindow * Returns the render settings of the 3D Window. */ Qt3DRender::QRenderSettings *renderSettings() const; - +#endif protected: