Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
ScriptedAlgorithmHelpers.h File Reference
#include <phosphortiles_export.h>
#include <PhosphorLayoutApi/AlgorithmMetadata.h>
#include <QJSValue>
#include <QRect>
#include <QString>
#include <QStringList>
#include <QVariant>
#include <QVariantMap>
#include <QVector>

Go to the source code of this file.

Classes

struct  PhosphorTiles::ScriptedHelpers::CustomParamDef
 Definition of a custom algorithm parameter. More...
 
struct  PhosphorTiles::ScriptedHelpers::ScriptMetadata
 Parsed script metadata from a JS-exported metadata object. More...
 

Namespaces

namespace  PhosphorTiles
 
namespace  PhosphorTiles::ScriptedHelpers
 JS builtin sources loaded from the :/builtins/ Qt resource at ScriptedAlgorithm::loadScript() time.
 

Functions

PHOSPHORTILES_EXPORT QVector< CustomParamDefPhosphorTiles::ScriptedHelpers::parseCustomParamsFromJs (const QJSValue &jsCustomParams, const QString &filePath)
 Parse custom parameter definitions from a JS-exported customParams array.
 
PHOSPHORTILES_EXPORT ScriptMetadata PhosphorTiles::ScriptedHelpers::parseMetadataFromJs (const QJSValue &jsMetadata, const QString &filePath)
 Parse full algorithm metadata from a JS-exported metadata object.
 
QVector< QRect > PhosphorTiles::ScriptedHelpers::jsArrayToRects (const QJSValue &result, const QString &scriptId, int maxZones)
 Convert a JS array of {x, y, width, height} objects to QRects.
 
QVector< QRect > PhosphorTiles::ScriptedHelpers::clampZonesToArea (const QVector< QRect > &zones, const QRect &area, const QString &scriptId)
 Clamp zones to the given area, using full area as fallback for zones entirely outside.