diff options
author | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-09-20 13:09:25 +0200 |
---|---|---|
committer | Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io> | 2018-09-26 08:37:16 +0000 |
commit | 15cfeb05314f3589e07d037662887f2e369c47cd (patch) | |
tree | 76e6da84d6340c6b8381a0a3ef13ac140c2a4bca /src | |
parent | 50f05e20d5609d44159831c899bedd35653a66ba (diff) |
Make QQuickShaderEffectMesh subclassable and exported
This can be very useful to access from external modules and
plugins, to allow customizing the meshes used in ShaderEffects.
Change-Id: I6ed62d6292f1550eb5bc0e690ec42ce7c35fe3d0
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquickshadereffectmesh.cpp | 5 | ||||
-rw-r--r-- | src/quick/items/qquickshadereffectmesh_p.h | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/quick/items/qquickshadereffectmesh.cpp b/src/quick/items/qquickshadereffectmesh.cpp index 77b7cbc78d..804f548d21 100644 --- a/src/quick/items/qquickshadereffectmesh.cpp +++ b/src/quick/items/qquickshadereffectmesh.cpp @@ -64,6 +64,11 @@ QQuickShaderEffectMesh::QQuickShaderEffectMesh(QObject *parent) { } +QQuickShaderEffectMesh::QQuickShaderEffectMesh(QObjectPrivate &dd, QObject *parent) + : QObject(dd, parent) +{ +} + /*! \qmltype GridMesh \instantiates QQuickGridMesh diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h index 5d6641429a..62a9798e40 100644 --- a/src/quick/items/qquickshadereffectmesh_p.h +++ b/src/quick/items/qquickshadereffectmesh_p.h @@ -72,7 +72,7 @@ const char *qtTexCoordAttributeName(); class QSGGeometry; class QRectF; -class QQuickShaderEffectMesh : public QObject +class Q_QUICK_PRIVATE_EXPORT QQuickShaderEffectMesh : public QObject { Q_OBJECT public: @@ -87,9 +87,12 @@ public: Q_SIGNALS: // Emitted when the geometry needs to be updated. void geometryChanged(); + +protected: + QQuickShaderEffectMesh(QObjectPrivate &dd, QObject *parent = nullptr); }; -class QQuickGridMesh : public QQuickShaderEffectMesh +class Q_QUICK_PRIVATE_EXPORT QQuickGridMesh : public QQuickShaderEffectMesh { Q_OBJECT Q_PROPERTY(QSize resolution READ resolution WRITE setResolution NOTIFY resolutionChanged) |