Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
PhosphorTiles::ScriptedHelpers::CustomParamDef Struct Reference

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.
 

Detailed Description

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: "..." } ] };

Member Function Documentation

◆ toVariantMap()

QVariantMap PhosphorTiles::ScriptedHelpers::CustomParamDef::toVariantMap ( ) const
inline

Convert to QVariantMap for QML consumption (name, type, defaultValue, description, etc.)

Member Data Documentation

◆ defaultValue

QVariant PhosphorTiles::ScriptedHelpers::CustomParamDef::defaultValue

Default value (qreal for number, bool for bool, QString for enum)

◆ description

QString PhosphorTiles::ScriptedHelpers::CustomParamDef::description

Human-readable description for settings UI.

◆ enumOptions

QStringList PhosphorTiles::ScriptedHelpers::CustomParamDef::enumOptions

Valid options for enum type.

◆ maxValue

qreal PhosphorTiles::ScriptedHelpers::CustomParamDef::maxValue = 1.0

Maximum for number type (1.0 if unset)

◆ minValue

qreal PhosphorTiles::ScriptedHelpers::CustomParamDef::minValue = 0.0

Minimum for number type (0.0 if unset)

◆ name

QString PhosphorTiles::ScriptedHelpers::CustomParamDef::name

Parameter name (camelCase, used as key in params.custom)

◆ type

QString PhosphorTiles::ScriptedHelpers::CustomParamDef::type

"number", "bool", or "enum"


The documentation for this struct was generated from the following file: