diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2012-01-11 17:34:58 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-01-16 15:07:33 +0100 |
commit | e79eedcb1eaf56280035550f4c6bb2395a51fd16 (patch) | |
tree | 45e6d0c6aa05ddd59762159b7dc27bd877f57134 /src/quick/items/qquickshadereffectmesh_p.h | |
parent | 7911627f718d0e4876c42adbb5f3e02cf3c9f4eb (diff) |
Added log and status properties to ShaderEffect.
Task-number: QTBUG-23531
Change-Id: I136f6d9642ff9d4074fe8dae1f5714a05349107a
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Diffstat (limited to 'src/quick/items/qquickshadereffectmesh_p.h')
-rw-r--r-- | src/quick/items/qquickshadereffectmesh_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/quick/items/qquickshadereffectmesh_p.h b/src/quick/items/qquickshadereffectmesh_p.h index 1671fd53f9..77a3c6abf6 100644 --- a/src/quick/items/qquickshadereffectmesh_p.h +++ b/src/quick/items/qquickshadereffectmesh_p.h @@ -64,7 +64,9 @@ class Q_QUICK_EXPORT QQuickShaderEffectMesh : public QObject public: QQuickShaderEffectMesh(QObject *parent = 0); // If 'geometry' != 0, 'attributes' is the same as last time the function was called. - virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect) const = 0; + virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect) = 0; + // If updateGeometry() fails, the reason should appear in the log. + virtual QString log() const { return QString(); } Q_SIGNALS: // Emitted when the geometry needs to be updated. @@ -77,7 +79,8 @@ class QQuickGridMesh : public QQuickShaderEffectMesh Q_PROPERTY(QSize resolution READ resolution WRITE setResolution NOTIFY resolutionChanged) public: QQuickGridMesh(QObject *parent = 0); - virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect) const; + virtual QSGGeometry *updateGeometry(QSGGeometry *geometry, const QVector<QByteArray> &attributes, const QRectF &rect); + virtual QString log() const { return m_log; } void setResolution(const QSize &res); QSize resolution() const; @@ -87,6 +90,7 @@ Q_SIGNALS: private: QSize m_resolution; + QString m_log; }; inline QColor qt_premultiply_color(const QColor &c) |