Structural schema for one action param. More...
#include <PhosphorRules/RuleAction.h>
Public Attributes | |
| QString | key {} |
| wire param key in RuleAction::params | |
| QString | kind {} |
| UI kind hint — see struct doc. | |
| std::optional< double > | min {} |
| inclusive lower bound, in display units | |
| std::optional< double > | max {} |
| inclusive upper bound, in display units | |
| std::optional< double > | scale {} |
| stored = display * scale; nullopt for unscaled kinds | |
| std::optional< double > | defaultDisplay {} |
| Initial display-unit value for the editor when a fresh rule is created. | |
| QStringList | enumWireValues {} |
| wire values for kind == "enum"; empty otherwise | |
Structural schema for one action param.
The schema carries enough information for the editor UI to render an input widget without the UI layer hand-maintaining a parallel per-type switch. kind is a UI-side hint string (the canonical kinds are string, number, percent, enum, bool, color, plus the picker-aware kinds snappingLayout, tilingAlgorithm, scrollingTemplate, animationEvent, shaderEffect, shaderPreset, overlayShader, overlayLayout, zoneOrdinals, zoneNames, curveEditor, screenId, virtualDesktop, workspaceName, decorationChain); QML loaders dispatch on it. Labels stay in the GPL settings layer because they need translation through PhosphorI18n::tr — the lib only owns the structural part of the schema.
The optional fields are populated by kind:
| std::optional<double> PhosphorRules::ParamSchema::defaultDisplay {} |
Initial display-unit value for the editor when a fresh rule is created.
Falls back to min when unset. Needed for kinds whose min is a valid but undesirable starting value — e.g. SetOpacity's min = 0 means a fresh rule would seed at 0% (invisible window) and saveable as-is; the descriptor instead declares defaultDisplay = 100.0 so the user starts at "no visible change" and must deliberately lower it.
| QStringList PhosphorRules::ParamSchema::enumWireValues {} |
wire values for kind == "enum"; empty otherwise
| QString PhosphorRules::ParamSchema::key {} |
wire param key in RuleAction::params
| QString PhosphorRules::ParamSchema::kind {} |
UI kind hint — see struct doc.
| std::optional<double> PhosphorRules::ParamSchema::max {} |
inclusive upper bound, in display units
| std::optional<double> PhosphorRules::ParamSchema::min {} |
inclusive lower bound, in display units
| std::optional<double> PhosphorRules::ParamSchema::scale {} |
stored = display * scale; nullopt for unscaled kinds