QtFM::FmPatchValue Class
The FmPatchValue type holds one patch in QML, as FmPatch makes it. More…
| Header | #include <QtFMQml/qfmqml.h> |
|---|---|
| CMake | target_link_libraries(app PRIVATE Nt::FMQml) |
| Module | Nt FM QML Types |
| Inherits | QObject |
List of all members, including inherited members
Public Functions
| FmPatchValue(const Patch &patch = Patch(), QObject *parent = nullptr) | |
| Patch | patch() const |
| bool | isValid() const |
| QString | name() const |
| QString | category() const |
| bool | isLoop() const |
| int | chip() const |
| QString | json() 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
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.