C

Q3DSDataInput Class

Controls a data input entry in a Qt 3D Studio presentation. More...

Header: #include <Q3DSDataInput>
Since: Qt 3D Studio 2.0
Instantiated By: DataInput
Inherits: QObject

Properties

  • 1 property inherited from QObject

Public Functions

Q3DSDataInput(Q3DSPresentation *presentation, const QString &name, QObject *parent = nullptr)
virtual ~Q3DSDataInput()
bool isValid() const
float max() const
QVariant metadata(const QVariant &key) const
QVariantList metadataKeys() const
float min() const
QString name() const
void removeMetadata(const QVariant &key)
void setMetadata(const QVariant &key, const QVariant &metadata)
QVariant value() const
  • 31 public functions inherited from QObject

Public Slots

void setMax(float max)
void setMin(float min)
void setName(const QString &name)
void setValue(const QVariant &value)
  • 1 public slot inherited from QObject

Signals

void maxChanged()
void minChanged()
void nameChanged()
void valueChanged()

Static Public Members

const QMetaObject staticMetaObject
  • 9 static public members inherited from QObject

Additional Inherited Members

  • 9 protected functions inherited from QObject

Detailed Description

Controls a data input entry in a Qt 3D Studio presentation.

This class is a convenience class for controlling a data input in a presentation.

See also Q3DSPresentation.

Property Documentation

max : float

Returns the maximum range value for datainput. Returned value is zero for datainput types other than Ranged Number.

Access functions:

float max() const
void setMax(float max)

Notifier signal:

void maxChanged()

min : float

Returns the minimum range value for datainput. Returned value is zero for datainput types other than Ranged Number.

Access functions:

float min() const
void setMin(float min)

Notifier signal:

void minChanged()

name : QString

Specifies the name of the controlled data input element in the presentation. This property must be set before setting the value property. The initial value is provided via the constructor in practice, but the name can also be changed later on, if desired.

Access functions:

QString name() const
void setName(const QString &name)

Notifier signal:

void nameChanged()

value : QVariant

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. Due to this uncertainty, this property treats all value sets as changes even if the newly set value is the same value as the previous value.

Access functions:

QVariant value() const
void setValue(const QVariant &value)

Notifier signal:

void valueChanged()

Member Function Documentation

Q3DSDataInput::Q3DSDataInput(Q3DSPresentation *presentation, const QString &name, QObject *parent = nullptr)

Constructs a Q3DSDataInput instance and initializes the name. The constructed instance is automatically associated with the specified presentation. An optional parent object can be specified.

[virtual] Q3DSDataInput::~Q3DSDataInput()

Destructor.

bool Q3DSDataInput::isValid() const

Returns true if presentation (or its subpresentation) associated with this datainput has a datainput definition with a matching name. Returns false if the datainput has no associated presentation, or if a match is not found.

QVariant Q3DSDataInput::metadata(const QVariant &key) const

Returns the metadata for this datainput for the specified key. Metadata is convenience data that can be used by API clients to better identify datainput purpose, and facilitate binding the appropriate external data source to this datainput. Metadata does not have any impact to rendering.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

See also setMetadata() and Q3DSDataInput::metadataKeys().

QVariantList Q3DSDataInput::metadataKeys() const

Returns the metadata keys for this datainput.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

See also Q3DSDataInput::metadata().

void Q3DSDataInput::removeMetadata(const QVariant &key)

Removes the metadata for this datainput for the specified key.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

See also Q3DSDataInput::metadata().

[slot] void Q3DSDataInput::setMax(float max)

Sets the maximum range value for datainput.

This property is applicable only to data input type Ranged Number.

Note: Setter function for property max.

See also max().

void Q3DSDataInput::setMetadata(const QVariant &key, const QVariant &metadata)

Sets the metadata for this datainput for the specified key.

Note: This function can be invoked via the meta-object system and from QML. See Q_INVOKABLE.

See also Q3DSDataInput::metadata().

[slot] void Q3DSDataInput::setMin(float min)

Sets the minimum range for datainput.

This property is applicable only to data input type Ranged Number.

Note: Setter function for property min.

See also min().

Available under certain Qt licenses.
Find out more.