Skip to main content

PipelineStepListWidget

PipelineStepListWidget

Widget for managing the ordered list of pipeline steps. More…

#include <PipelineStepListWidget.hpp>

Inherits from QWidget

Public Signals

Name
void stepSelected(int step_index)
void pipelineChanged()
void validationChanged(bool all_valid)

Public Functions

Name
PipelineStepListWidget(QWidget * parent =[nullptr])
~PipelineStepListWidget() override
void setInputType(std::type_index element_type, std::type_index container_type)
Set the input element type for the pipeline.
std::type_index currentOutputElementType() const
Get the current output element type of the pipeline.
std::type_index currentOutputContainerType() const
Get the current output container type of the pipeline.
std::vector< PipelineStepEntry > const & steps() const
Get all pipeline steps.
int selectedStepIndex() const
Get the currently selected step index.
void clearSteps()
Clear all steps.
bool addStep(std::string const & transform_name, std::string const & params_json =“{}”)
Add a step with the given transform name and optional params JSON.
void updateStepParams(int step_index, std::string const & params_json)
Update the parameters JSON for a specific step.
void updateStepAdditionalInput(int step_index, std::string const & additional_input_key)
Update the second input key for a multi-input step.
bool hasMultiInputStep() const
Check whether any step is a multi-input transform.
bool allMultiInputStepsConfigured() const
Check whether every multi-input step has a configured second key.
bool hasMultiInputWithExtraSteps() const
Check whether a multi-input step coexists with additional steps.
bool loadFromDescriptors(std::vector< Neuralyzer::Transforms::V2::Examples::PipelineStepDescriptor > const & descriptors)
Rebuild all steps from a list of PipelineStepDescriptors.

Detailed Description

class PipelineStepListWidget;

Widget for managing the ordered list of pipeline steps.

Provides:

  • Steps table with columns: #, Input Type, Transform, Output Type
  • Inline “Available Transforms” browser (no popup dialog)
  • [Remove] button for the selected step
  • Inline validation indicators (red background on incompatible steps)
  • Selection → emits stepSelected() for the config panel

Double-clicking a row in the Available Transforms table adds it to the pipeline.

Public Signals Documentation

signal stepSelected

void stepSelected(
    int step_index
)

signal pipelineChanged

void pipelineChanged()

signal validationChanged

void validationChanged(
    bool all_valid
)

Public Functions Documentation

function PipelineStepListWidget

explicit PipelineStepListWidget(
    QWidget * parent =nullptr
)

function ~PipelineStepListWidget

~PipelineStepListWidget() override

function setInputType

void setInputType(
    std::type_index element_type,
    std::type_index container_type
)

Set the input element type for the pipeline.

Parameters:

  • element_type The element type (e.g., typeid(Mask2D))
  • container_type The container type (e.g., typeid(MaskData))

This determines which transforms are available for the first step.

function currentOutputElementType

std::type_index currentOutputElementType() const

Get the current output element type of the pipeline.

Return: The output type after the last step, or the input type if empty

function currentOutputContainerType

std::type_index currentOutputContainerType() const

Get the current output container type of the pipeline.

Return: The output container type after the last step

function steps

inline std::vector< PipelineStepEntry > const & steps() const

Get all pipeline steps.

function selectedStepIndex

int selectedStepIndex() const

Get the currently selected step index.

Return: The index or -1 if none selected

function clearSteps

void clearSteps()

Clear all steps.

function addStep

bool addStep(
    std::string const & transform_name,
    std::string const & params_json ="{}"
)

Add a step with the given transform name and optional params JSON.

Parameters:

  • transform_name The registered transform name
  • params_json Optional parameters as JSON string

Return: true if the step was successfully added

function updateStepParams

void updateStepParams(
    int step_index,
    std::string const & params_json
)

Update the parameters JSON for a specific step.

Parameters:

  • step_index The index of the step to update
  • params_json The new parameters JSON

function updateStepAdditionalInput

void updateStepAdditionalInput(
    int step_index,
    std::string const & additional_input_key
)

Update the second input key for a multi-input step.

Parameters:

  • step_index Index of the step to update
  • additional_input_key Second DataManager key, or empty to clear

function hasMultiInputStep

bool hasMultiInputStep() const

Check whether any step is a multi-input transform.

function allMultiInputStepsConfigured

bool allMultiInputStepsConfigured() const

Check whether every multi-input step has a configured second key.

function hasMultiInputWithExtraSteps

bool hasMultiInputWithExtraSteps() const

Check whether a multi-input step coexists with additional steps.

Option A limitation: multi-input execution requires a single-step pipeline.

function loadFromDescriptors

bool loadFromDescriptors(
    std::vector< Neuralyzer::Transforms::V2::Examples::PipelineStepDescriptor > const & descriptors
)

Rebuild all steps from a list of PipelineStepDescriptors.

Parameters:

  • descriptors The step descriptors from a parsed PipelineDescriptor

Return: true if all steps were loaded successfully

Used by JSON → UI loading. Clears existing steps, then adds each step using the descriptor’s transform_name and serialized parameters.


Updated on 2026-11-13 at 20:25:40 +0000