6.0.0-rc4Source

QtFM::FmPatchValue Class

The FmPatchValue type holds one patch in QML, as FmPatch makes it. More…

Header#include <QtFMQml/qfmqml.h>
CMaketarget_link_libraries(app PRIVATE Nt::FMQml)
ModuleNt FM QML Types
InheritsQObject

List of all members, including inherited members

Public Functions

FmPatchValue(const Patch &patch = Patch(), QObject *parent = nullptr)
Patchpatch() const
boolisValid() const
QStringname() const
QStringcategory() const
boolisLoop() const
intchip() const
QStringjson() const

Detailed Description

Assign it to FmSound::patch. It is immutable: FmPatch.mutated() returns a new one.

Differences from Qt

The patch is an object rather than a value type, as Nt QML has no value types of its own.

Member Function Documentation

[explicit] QtFM::FmPatchValue::FmPatchValue(const Patch &patch = Patch(), QObject *parent = nullptr)

Constructs a value holding patch, with parent.

QString QtFM::FmPatchValue::category() const

Returns the category of the patch.

int QtFM::FmPatchValue::chip() const

Returns the chip that the patch targets, an FmChip value.

bool QtFM::FmPatchValue::isLoop() const

Returns true if the patch sustains until stopped.

bool QtFM::FmPatchValue::isValid() const

Returns true if the value holds a patch.

QString QtFM::FmPatchValue::json() const

Returns the patch as JSON.

QString QtFM::FmPatchValue::name() const

Returns the name of the patch.

Patch QtFM::FmPatchValue::patch() const

Returns the patch.