C
DataInput QML Type
Controls a data input entry in a Qt 3D Studio presentation. More...
Import Statement: | import QtStudio3D.OpenGL 2.8 |
Instantiates: | Q3DSDataInput |
Properties
- max : real
- metadataKeys : list<string>
- min : real
- name : string
- value : variant
Methods
- string metadata(string key)
- list<string> metadataKeys()
Detailed Description
This class is a convenience class for controlling a data input in a presentation. DataInput provides a clean contract between the presentation design and the code. It hides the presentation details from the code while providing a contractual access point to code for controlling aspects of the presentation (e.g. timeline of a subpresentation). It also allows the design to use a single DataInput to drive multiple aspects of the design (e.g. DataInput for speed can change the color of the speedometer, angle of the needle).
As an example:
Studio3D { ... Presentation { id: presentation ... property string text: "" DataInput { name: "inputForSomeTextNode" value: presentation.text } } } Button { onClicked: presentation.text = "Hello World" }
The example assumes that a data input connection was made in Qt 3D Studio presentation using Qt 3D Studio editor between the textstring
property of target property and a data input name 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.
See also Presentation, DataOutput, Presentation.slideExited(), Presentation.slideEntered(), and Presentation.customSignalEmitted().
Property Documentation
max : real |
Contains the maximum value of the controlled data input element range.
This property is applicable only to data input type Ranged Number. For other types, value returned is zero.
Note: This value is read-only.
Contains the metadata keys specified for this datainput.
Note: This value is read-only.
min : real |
Contains the minimum value of the controlled data input element range.
This property is applicable only to data input type Ranged Number. For other types, value returned is zero.
Note: This value is read-only.
name : string |
Specifies the name of the controlled data input element in the presentation. The name must match a name of a data input defined in the presentation. This property must be set before setting the value property.
value : variant |
Specifies the value of the controlled data input element in the presentation.
The value of this property only accounts for changes done via the same Q3DSDataInput instance. If the value of the same data input in the presentation is changed elsewhere, for example via animations or Q3DSPresentation::setAttribute(), those changes are not reflected in the value of this property.
To get actual values from the presentation, use DataOutput.
See also DataOutput.
Method Documentation
Returns the metadata defined for this datainput with metadata key.
Metadata is user-defined key-value table that can be used, for example, to better describe the usage of, or to indicate the external data source that should be bound to this datainput. Metadata has no impact on presentation rendering.
Note: Datainput metadata is read-only.
Available under certain Qt licenses.
Find out more.