diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-05-14 11:02:30 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-05-28 11:14:34 +0000 |
commit | 2d1bd330a141e83a7d79dcb945557d9703995081 (patch) | |
tree | 1879025fda3bc8a26ed0a972f670ec747cbd63c2 /src/Runtime/api/studio3d/q3dsdatainput.h | |
parent | 07af75cf100a21da07ba12ad0c714cdfc37091aa (diff) |
Make Datainput min and max read-only
Remove setters and change signals for datainput min and max properties.
These properties are not intended to be changed at runtime, and
asynchronous separation of QML client side and renderer does not allow
trivial tracking of these values. Min and max are now initialized at UIA
load.
Also fix bug where QML side did not receive UIA-specified min/max values.
Change-Id: Ie04e81ea55bc4f4159c9f6989660caf9c36c49ed
Task-id: QT3DS-3578
Reviewed-by: Antti Määttä <antti.maatta@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
Diffstat (limited to 'src/Runtime/api/studio3d/q3dsdatainput.h')
-rw-r--r-- | src/Runtime/api/studio3d/q3dsdatainput.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Runtime/api/studio3d/q3dsdatainput.h b/src/Runtime/api/studio3d/q3dsdatainput.h index d57b5f18..4504e5d2 100644 --- a/src/Runtime/api/studio3d/q3dsdatainput.h +++ b/src/Runtime/api/studio3d/q3dsdatainput.h @@ -46,8 +46,8 @@ class Q_STUDIO3D_EXPORT Q3DSDataInput : public QObject Q_PROPERTY(QString name READ name WRITE setName NOTIFY nameChanged) Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) - Q_PROPERTY(float max READ max WRITE setMax NOTIFY maxChanged) - Q_PROPERTY(float min READ min WRITE setMin NOTIFY minChanged) + Q_PROPERTY(float max READ max CONSTANT) + Q_PROPERTY(float min READ min CONSTANT) public: explicit Q3DSDataInput(QObject *parent = nullptr); explicit Q3DSDataInput(const QString &name, QObject *parent = nullptr); @@ -71,14 +71,10 @@ public: public Q_SLOTS: void setName(const QString &name); void setValue(const QVariant &value); - void setMin(float min); - void setMax(float max); Q_SIGNALS: void nameChanged(); void valueChanged(); - void minChanged(); - void maxChanged(); protected: explicit Q3DSDataInput(Q3DSDataInputPrivate *d, Q3DSPresentation *presentation, @@ -88,6 +84,7 @@ protected: private: Q_DISABLE_COPY(Q3DSDataInput) friend class Q3DSPresentationPrivate; + friend class Q3DSRenderer; }; QT_END_NAMESPACE |