Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo Struct Reference

Declared shader inputs beyond the standard surface set (uTexture0, uSurfaceSize, uSurfaceFocused, etc.). More...

#include <PhosphorSurface/SurfaceShaderEffect.h>

Public Attributes

QString id
QString name
QString type
 "float", "int", "bool", "color"
QString description
 Optional one-line tooltip for the settings UI.
QString group
 Optional accordion group name for the settings UI.
QVariant defaultValue
 JSON/QML key: default.
QVariant minValue
 JSON/QML key: min.
QVariant maxValue
 JSON/QML key: max.
QVariant stepValue
 Optional slider step; JSON/QML key: step. QML falls back to (max-min)/200.

Detailed Description

Declared shader inputs beyond the standard surface set (uTexture0, uSurfaceSize, uSurfaceFocused, etc.).

An ORDERED list of { id, type, default, min, max, ... } entries, not a map: declaration order is what assigns the customParams / customColors slots, so the sequence is part of the contract. A duplicate id is dropped at parse time, because two entries sharing one would redefine the same p_ macro and fail the shader compile. Field names mirror the regular shader pack format (AnimationShaderEffect::ParameterInfo / PhosphorRendering::ShaderRegistry::ParameterInfo) so surface packs and overlay/animation packs can share QML editor components.

C++ field name vs JSON key asymmetry: the QVariant fields are suffixed Value because default is a C++ keyword; the wire- format and QML-facing keys are the bare forms (default/min/max/step). See toJson() / fromJson() in surfaceshadereffect.cpp for the mapping.

Member Data Documentation

◆ defaultValue

QVariant PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::defaultValue

JSON/QML key: default.

◆ description

QString PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::description

Optional one-line tooltip for the settings UI.

◆ group

QString PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::group

Optional accordion group name for the settings UI.

◆ id

QString PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::id

◆ maxValue

QVariant PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::maxValue

JSON/QML key: max.

◆ minValue

QVariant PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::minValue

JSON/QML key: min.

◆ name

QString PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::name

◆ stepValue

QVariant PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::stepValue

Optional slider step; JSON/QML key: step. QML falls back to (max-min)/200.

◆ type

QString PhosphorSurfaceShaders::SurfaceShaderEffect::ParameterInfo::type

"float", "int", "bool", "color"


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