Q3DSDataOutput Class | OpenGL Runtime 2.7.0

OpenGL Runtime | OpenGL Runtime | C++ Classes | Q3DSDataOutput

Qt 3D Studio OpenGL Runtime 2.7 Manual

# Q3DSDataOutput Class

Provides notifications from data output entries in Qt 3D Studio presentation. More...

Header: | #include <Q3DSDataOutput>
Since: | Qt 3D Studio 2.4
Instantiated By: | DataOutput
Inherits: | QObject

- List of all members, including inherited members
- Obsolete members

## Properties

- name : QString
- value : const QVariant

- 1 property inherited from QObject

## Public Functions

| Q3DSDataOutput(QObject *parent = nullptr)
| Q3DSDataOutput(const QString &name, QObject *parent = nullptr)
| Q3DSDataOutput(Q3DSPresentation *presentation, const QString &name, QObject *parent = nullptr)
virtual | ~Q3DSDataOutput()
QString | name() const
QVariant | value() const

- 31 public functions inherited from QObject

## Public Slots

void | setName(const QString &name)

- 1 public slot inherited from QObject

## Signals

void | nameChanged(const QString &newName)
void | valueChanged(const QVariant &newValue)

- 2 signals inherited from QObject

## Static Public Members

const QMetaObject | staticMetaObject

- 9 static public members inherited from QObject

## Protected Functions

| Q3DSDataOutput(Q3DSDataOutputPrivate *d, Q3DSPresentation *presentation, const QString &name, QObject *parent = nullptr)

- 9 protected functions inherited from QObject

## Protected Variables

Q3DSDataOutputPrivate * | d_ptr

## Detailed Description

Provides notifications from data output entries in Qt 3D Studio presentation.

This class is a convenience class for listening for changes in the Qt 3D Studio presentation attributes. DataOutput 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 to be notified when aspects of the presentation change (e.g. movement of an element in the presentation due to timeline animation).

DataOutput can be attached to same attributes in the design as DataInput is, including presentation timeline. Only exception is slide changes (slide changes are already notified through `Q3DSPresentation::slideEntered` and `Q3DSPresentation::slideExited` signals).

Note: There is a performance cost for each registered DataOutput, so try to avoid creating unnecessary DataOutputs.

For other integration points between code and presentation see:

See also Q3DSPresentation::customSignalEmitted, Q3DSPresentation::slideEntered, Q3DSPresentation::slideExited, Q3DSDataInput, and Q3DSPresentation.

## Property Documentation

### name : QString

Specifies the name of the observed data output element in the presentation. The name must match a name of a data output defined in the presentation.

This property must be set before setting the value property. The initial value is provided via the constructor, but the name can also be changed later on.

Access functions:

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

Notifier signal:

void | nameChanged(const QString &newName)

### value : const QVariant

Contains the read-only value of the controlled data output element in the presentation.

The value of this property accounts for actual value in the last processed frame of the presentation. This includes animation timeline driven changes, changes done via DataInput and changes done via Behavior scripts.

Access functions:

QVariant | value() const

Notifier signal:

void | valueChanged(const QVariant &newValue)

## Member Function Documentation

### Q3DSDataOutput::Q3DSDataOutput(QObject *parent = nullptr)

Default constructs an instance of Q3DSDataOutput.

### Q3DSDataOutput::Q3DSDataOutput(const QString &name, QObject *parent = nullptr)

Default constructs an instance of Q3DSDataOutput.

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

Default constructs an instance of Q3DSDataOutput.

### `[protected]` Q3DSDataOutput::Q3DSDataOutput(Q3DSDataOutputPrivate *d, Q3DSPresentation *presentation, const QString &name, QObject *parent = nullptr)

Default constructs an instance of Q3DSDataOutput.

### `[virtual]` Q3DSDataOutput::~Q3DSDataOutput()

Destroys the instance of Q3DSDataOutput. The destructor is virtual.

### `[signal]` void Q3DSDataOutput::valueChanged(const QVariant &newValue)

Emitted when the value of the observed DataOutput has changed to newValue in the presentation.

Note: Notifier signal for property value.