summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJanne Kangas <janne.kangas@qt.io>2019-06-13 14:33:07 +0300
committerJanne Kangas <janne.kangas@qt.io>2019-06-14 13:49:15 +0300
commit394b155234e256cf774f107178bc04cbaaedfc1d (patch)
tree2b7f2af78e694dd71177b43c83b2b99b46797f6c
parentb66de18c478dcf9f8844282ccbd9c7a65a86721f (diff)
Remove duplicate documentation from datainput
Change-Id: Ie23dbee91d129a983d7bfd2700a5fa5a851be641 Reviewed-by: Mats Honkamaa <mats.honkamaa@qt.io> Reviewed-by: Pasi Keränen <pasi.keranen@qt.io>
-rw-r--r--src/api/studio3d/q3dsdatainput.cpp71
1 files changed, 27 insertions, 44 deletions
diff --git a/src/api/studio3d/q3dsdatainput.cpp b/src/api/studio3d/q3dsdatainput.cpp
index 45134d8..eb8e24e 100644
--- a/src/api/studio3d/q3dsdatainput.cpp
+++ b/src/api/studio3d/q3dsdatainput.cpp
@@ -49,6 +49,33 @@ QT_BEGIN_NAMESPACE
multiple aspects of the design (e.g. DataInput for speed can change the color of
the speedometer, angle of the needle).
+ As an example:
+
+ \qml
+ Studio3D {
+ ...
+ Presentation {
+ id: presentation
+ ...
+ property string text: ""
+ DataInput {
+ name: "inputForSomeTextNode"
+ value: presentation.text
+ }
+ }
+ }
+
+ Button {
+ onClicked: presentation.text = "Hello World"
+ }
+ \endqml
+
+ The example assumes that a data input connection was made in Qt 3D Studio
+ presentation using Qt 3D Studio editor between the \c textstring property of
+ target property and a data input name \c inputForSomeTextNode. As the value
+ is now set via a property, the full set of QML property bindings techniques
+ are available.
+
\note There is a performance cost for each registered DataInput, so try to avoid
creating unnecessary DataInputs.
@@ -353,50 +380,6 @@ void Q3DSDataInputPrivate::setCommandQueue(CommandQueue *queue)
setValue(m_value);
}
-
-/*!
- \qmltype DataInput
- \instantiates Q3DSDataInput
- \inqmlmodule QtStudio3D
- \ingroup OpenGLRuntime
-
- \brief Controls a data input entry in a Qt 3D Studio presentation.
-
- This type is a convenience for controlling a data in a presentation. Its functionality is
- equivalent to \c{Presentation::setDataInputValue()}, however it has a big advantage
- of being able to use QML property bindings, thus avoiding the need to having to resort
- to a JavaScript function call for every value change.
-
- As an example:
-
- \qml
- Studio3D {
- ...
- Presentation {
- id: presentation
- ...
- property string text: ""
- DataInput {
- name: "inputForSomeTextNode"
- value: presentation.text
- }
- }
- }
-
- Button {
- onClicked: presentation.text = "Hello World"
- }
- \endqml
-
- The example assumes that a data input connection was made in Qt 3D Studio
- presentation using Qt 3D Studio editor between the \c textstring property of
- target property and a data input name \c inputForSomeTextNode. As the value
- is now set via a property, the full set of QML property bindings techniques
- are available.
-
- \sa Studio3D, Presentation
-*/
-
/*!
\qmlproperty string DataInput::name