From 394b155234e256cf774f107178bc04cbaaedfc1d Mon Sep 17 00:00:00 2001 From: Janne Kangas Date: Thu, 13 Jun 2019 14:33:07 +0300 Subject: Remove duplicate documentation from datainput MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie23dbee91d129a983d7bfd2700a5fa5a851be641 Reviewed-by: Mats Honkamaa Reviewed-by: Pasi Keränen --- src/api/studio3d/q3dsdatainput.cpp | 71 +++++++++++++++----------------------- 1 file 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 -- cgit v1.2.3