Definition of a custom algorithm parameter. More...
#include <phosphor-tiles/include/PhosphorTiles/ScriptedAlgorithmHelpers.h>
Public Member Functions | |
| QVariantMap | toVariantMap () const |
| Convert to QVariantMap for QML consumption (name, type, defaultValue, description, etc.) | |
Public Attributes | |
| QString | name |
| Parameter name (camelCase, used as key in params.custom) | |
| QString | type |
| "number", "bool", or "enum" | |
| QVariant | defaultValue |
| Default value (qreal for number, bool for bool, QString for enum) | |
| QString | description |
| Human-readable description for settings UI. | |
| qreal | minValue = 0.0 |
| Minimum for number type (0.0 if unset) | |
| qreal | maxValue = 1.0 |
| Maximum for number type (1.0 if unset) | |
| QStringList | enumOptions |
| Valid options for enum type. | |
Definition of a custom algorithm parameter.
Declared by scripts inside the var metadata object: var metadata = { name: "My Algorithm", customParams: [ { name: "gap", type: "number", default: 8, min: 0, max: 50, description: "Gap size" }, { name: "wrap", type: "bool", default: true, description: "Wrap around" }, { name: "mode", type: "enum", default: "auto", options: ["auto","manual"], description: "..." } ] };
|
inline |
Convert to QVariantMap for QML consumption (name, type, defaultValue, description, etc.)
| QVariant PhosphorTiles::ScriptedHelpers::CustomParamDef::defaultValue |
Default value (qreal for number, bool for bool, QString for enum)
| QString PhosphorTiles::ScriptedHelpers::CustomParamDef::description |
Human-readable description for settings UI.
| QStringList PhosphorTiles::ScriptedHelpers::CustomParamDef::enumOptions |
Valid options for enum type.
| qreal PhosphorTiles::ScriptedHelpers::CustomParamDef::maxValue = 1.0 |
Maximum for number type (1.0 if unset)
| qreal PhosphorTiles::ScriptedHelpers::CustomParamDef::minValue = 0.0 |
Minimum for number type (0.0 if unset)
| QString PhosphorTiles::ScriptedHelpers::CustomParamDef::name |
Parameter name (camelCase, used as key in params.custom)
| QString PhosphorTiles::ScriptedHelpers::CustomParamDef::type |
"number", "bool", or "enum"