diff options
author | Janne Kangas <janne.kangas@qt.io> | 2019-05-14 11:02:30 +0300 |
---|---|---|
committer | Janne Kangas <janne.kangas@qt.io> | 2019-06-11 11:19:32 +0300 |
commit | 24bdd648eb1724b50594408de4bfbf1f73a755d1 (patch) | |
tree | 215583d3bc369b3bac82819589cc62522789a27e /src | |
parent | e366719a6ca814d3a1706e7ad731ff6655f4f59d (diff) |
Make datainput metadata keys constant Q_PROPERTY
Remove invokable datainputKeys and make it a datainput property instead.
In OpenGL RT this is a constant property as metadata is read-only property.
Also update qmldatainput example.
Change-Id: Ic9037f831b4072481ad5b2fac78ecc68db6808b2
Task-id: QT3DS-3625
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/api/studio3d/q3dsdatainput.cpp | 15 | ||||
-rw-r--r-- | src/api/studio3d/q3dsdatainput.h | 3 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/api/studio3d/q3dsdatainput.cpp b/src/api/studio3d/q3dsdatainput.cpp index a15f9fb..45134d8 100644 --- a/src/api/studio3d/q3dsdatainput.cpp +++ b/src/api/studio3d/q3dsdatainput.cpp @@ -290,13 +290,6 @@ QString Q3DSDataInput::metadata(const QString &key) const \sa metadata */ -/*! - \qmlmethod var DataInput::metadataKeys - Returns the metadata keys defined for this datainput. - - \note Datainput metadata is read-only. - \sa metadata - */ QStringList Q3DSDataInput::metadataKeys() const { if (!d_ptr->m_presentation) @@ -448,4 +441,12 @@ void Q3DSDataInputPrivate::setCommandQueue(CommandQueue *queue) \note This value is read-only. */ +/*! + \qmlproperty list<string> DataInput::metadataKeys + + Contains the metadata keys specified for this datainput. + + \note This value is read-only. +*/ + QT_END_NAMESPACE diff --git a/src/api/studio3d/q3dsdatainput.h b/src/api/studio3d/q3dsdatainput.h index 3617dcd..3f81c65 100644 --- a/src/api/studio3d/q3dsdatainput.h +++ b/src/api/studio3d/q3dsdatainput.h @@ -48,6 +48,7 @@ class Q_STUDIO3D_EXPORT Q3DSDataInput : public QObject Q_PROPERTY(QVariant value READ value WRITE setValue NOTIFY valueChanged) Q_PROPERTY(float max READ max CONSTANT) Q_PROPERTY(float min READ min CONSTANT) + Q_PROPERTY(QStringList metadataKeys READ metadataKeys CONSTANT) public: explicit Q3DSDataInput(QObject *parent = nullptr); explicit Q3DSDataInput(const QString &name, QObject *parent = nullptr); @@ -69,7 +70,7 @@ public: bool isValid() const; Q_INVOKABLE QString metadata(const QString &key) const; - Q_INVOKABLE QStringList metadataKeys() const; + QStringList metadataKeys() const; public Q_SLOTS: void setName(const QString &name); |