Skip to main content

Widget Development Guide

This guide walks through the systems that a new widget in WhiskerToolbox should integrate with. Each section describes what the system does, when you need it, and how to wire it up. The goal is not to duplicate the detailed reference docs — those are linked throughout — but to give you a map of the landscape and a concrete checklist.

Overview: What Makes a Widget

A WhiskerToolbox widget is a Qt6 QWidget that lives inside the Qt6AdvancedDocking dock system. Unlike a traditional Qt application where you manually create widgets and add them to layouts, WhiskerToolbox widgets are registered as types with the EditorRegistry, which manages their lifecycle, placement, and serialization.

A fully-featured widget integrates with up to six systems:

System Purpose Required?
EditorRegistry Type registration, factory functions, dock placement Yes — every widget
DataManager + Observer Reading/writing shared data, reacting to changes Yes — nearly every widget
Command Architecture Serializable, undoable data mutations When widget mutates DataManager
ParameterSchema + AutoParamWidget Auto-generated config forms from C++ structs When widget has configurable parameters
Context Actions Right-click actions that open/configure your widget When widget can be a target for data
Keymap System Configurable keyboard shortcuts When widget has keyboard-driven actions

The following diagram shows how these systems relate at runtime:

  User types a key                   User right-clicks data
        │                                    │
        ▼                                    ▼
 ┌──────────────┐                  ┌──────────────────┐
 │ KeymapManager│                  │ SelectionContext  │
 │ (event filter│                  │ (ContextActions)  │
 └──────┬───────┘                  └────────┬─────────┘
        │ dispatch                          │ execute()
        ▼                                   ▼
 ┌──────────────┐  ◄──── state ───  ┌──────────────┐
 │ KeyAction    │                   │ EditorRegistry│
 │ Adapter      │  ───── owns ───►  │ (type + state)│
 └──────┬───────┘                   └───────┬───────┘
        │                                   │ createEditor()
        ▼                                   ▼
 ┌──────────────────────────────────────────────────┐
 │                   Your Widget                     │
 │                                                   │
 │  ┌────────────────┐   ┌────────────────────────┐ │
 │  │ EditorState    │   │ AutoParamWidget         │ │
 │  │ (serializable) │   │ (generated from         │ │
 │  │                │   │  ParameterSchema)       │ │
 │  └────────┬───────┘   └────────────────────────┘ │
 │           │                                       │
 │           │ reads/writes via Commands              │
 │           ▼                                       │
 │     ┌──────────┐   notifyObservers()              │
 │     │DataManager├──────────────────────►callbacks  │
 │     └──────────┘                                  │
 └───────────────────────────────────────────────────┘

1. EditorRegistry — Type Registration and Lifecycle

Every widget starts here. The EditorRegistry is the central catalog that knows what widget types exist, how to create them, and where to place them in the dock layout.

Detailed reference: Inter-Widget Communication Roadmap

What You Provide

You register an EditorTypeInfo struct that describes your widget type. The key fields are:

Field What it controls
type_id Unique string identifier (e.g. "MyWidget")
display_name Shown in the View menu
menu_path Menu hierarchy (e.g. "View/Analysis")
preferred_zone / properties_zone Where the dock places the view and properties panels
allow_multiple Whether the user can open more than one instance
create_state Factory for your EditorState subclass
create_view Factory for the main QWidget
create_properties Factory for the properties/sidebar QWidget (optional)
create_editor_custom Alternative: single factory that builds everything (for complex cases)

Zone Placement

Widgets are placed into one of four zones:

┌──────────────────────────────────────────────────────────────────┐
│  Menu Bar                                                        │
├────────────────┬─────────────────────────────┬───────────────────┤
│   Left         │         Center              │      Right        │
│   Data tree,   │   Main content:             │   Properties,     │
│   Groups       │   Media, Plots              │   Inspectors      │
├────────────────┴─────────────────────────────┴───────────────────┤
│  Bottom  (Timeline, Terminal)                                    │
└──────────────────────────────────────────────────────────────────┘

Choose Zone::Center for primary content widgets (visualizations, editors) and Zone::Right for tools/config panels. Data browsers typically go in Zone::Left.

The Registration File

Each widget module has a dedicated registration file. This is the conventional pattern:

src/WhiskerToolbox/MyWidget/
├── CMakeLists.txt
├── MyWidget.hpp / .cpp         ← The widget itself
├── MyWidgetState.hpp / .cpp    ← EditorState subclass
└── MyWidgetRegistration.hpp / .cpp  ← Registration with EditorRegistry

If the registration file grows (see § Registration File Organization below), an optional companion file can be added:

src/WhiskerToolbox/MyWidget/
├── CMakeLists.txt
├── MyWidget.hpp / .cpp
├── MyWidgetState.hpp / .cpp
├── MyWidgetRegistration.hpp / .cpp  ← Type metadata + factories
└── MyWidgetActions.cpp              ← (optional) Actions when file exceeds ~250 lines

MyWidgetRegistration.hpp:

#pragma once

class EditorRegistry;
class DataManager;
#include <memory>

namespace MyWidgetModule {
void registerTypes(EditorRegistry * registry,
                   std::shared_ptr<DataManager> data_manager);
}

MyWidgetRegistration.cpp (standard pattern — separate view and properties factories):

#include "MyWidgetRegistration.hpp"
#include "MyWidget.hpp"
#include "MyWidgetState.hpp"
#include "EditorState/EditorRegistry.hpp"

namespace MyWidgetModule {

namespace {

// Named helpers keep registerTypes() readable as actions accumulate.
// registerEditorActions: keymap descriptors (pure metadata, no widget instance)
// registerContextActions: right-click menu entries tied to SelectionContext
//
// Add sections here as the widget grows. Extract to MyWidgetActions.cpp
// if this file exceeds ~250 lines or the widget has more than ~8 actions.

// void registerEditorActions(KeymapSystem::KeymapManager * km) { ... }
// void registerContextActions(EditorRegistry * registry, ...) { ... }

} // namespace

void registerTypes(EditorRegistry * registry,
                   std::shared_ptr<DataManager> data_manager)
{
    auto dm = std::move(data_manager);

    // registerEditorActions(km);       // uncomment when keymap integration is added
    // registerContextActions(registry); // uncomment when context actions are added

    registry->registerType({
        .type_id = QStringLiteral("MyWidget"),
        .display_name = QStringLiteral("My Widget"),
        .menu_path = QStringLiteral("View/Analysis"),
        .preferred_zone = Zone::Center,
        .properties_zone = Zone::Right,
        .allow_multiple = true,

        .create_state = []() {
            return std::make_shared<MyWidgetState>();
        },

        .create_view = [dm](std::shared_ptr<EditorState> state) -> QWidget * {
            auto my_state = std::dynamic_pointer_cast<MyWidgetState>(state);
            auto * widget = new MyWidget(my_state, dm);
            return widget;
        },

        .create_properties = [dm](std::shared_ptr<EditorState> state) -> QWidget * {
            auto my_state = std::dynamic_pointer_cast<MyWidgetState>(state);
            return new MyWidgetProperties(my_state, dm);
        }
    });
}

} // namespace MyWidgetModule

For widgets that need a more complex setup (cross-references between subwidgets, access to SelectionContext, etc.), use create_editor_custom instead. See the MLCoreWidget registration for an example of this pattern.

Registration File Organization

The registration file has three distinct jobs that tend to grow independently:

  1. Type metadata — EditorTypeInfo struct and factory lambdas
  2. Editor actions — keymap descriptor registration
  3. Context actions — right-click menu entries

The convention is to represent each concern as a named static void helper in an anonymous namespace at the top of the registration .cpp, and call them from registerTypes(). This keeps the registerTypes() function readable as the widget grows.

namespace MyWidgetModule {

namespace {

static void registerEditorActions(KeymapSystem::KeymapManager * km) {
    auto const scope = KeyActionScope::editorFocused(
            EditorTypeId(QStringLiteral("MyWidget")));
    km->registerAction({
        .action_id = QStringLiteral("my_widget.do_something"),
        ...});
}

static void registerContextActions(EditorRegistry * registry,
                                   std::shared_ptr<DataManager> const & dm) {
    ContextAction action;
    action.action_id = QStringLiteral("my_widget.analyze_tensor");
    // ...
    registry->selectionContext()->registerAction(std::move(action));
}

} // namespace

void registerTypes(EditorRegistry * registry, ...) {
    registerEditorActions(km);
    registerContextActions(registry, dm);
    registry->registerType({ /* factories */ });
}

} // namespace MyWidgetModule
TipWhen to extract to a companion file

Extract to MyWidgetActions.cpp (added to the same static library) when:

  • The registration .cpp exceeds ~250 lines, or
  • The widget has more than ~8 actions across categories

Do not create empty placeholder action files — add the helpers when there is something to register. The Keybinding Editor widget (Phase 3) is the canonical answer to “what actions does this widget have?”, not the source files.

Action ID naming: follow the <widget_domain>.<verb>_<noun> convention (e.g. my_widget.assign_group_1, scatter_plot.visualize_2d_tensor). The prefix is what groups actions together in the Keybinding Editor.

EditorState

Every widget type has an EditorState subclass that holds its serializable state. This is what gets saved/restored when the user saves a workspace.

Key requirements:

  • Inherit from EditorState (a QObject)
  • Override getTypeName(), toJson(), fromJson()
  • Use a reflect-cpp serializable struct for the data
  • Emit stateChanged() when state is modified
  • Call markDirty() to flag unsaved changes
struct MyWidgetStateData {
    std::string selected_key;
    double zoom = 1.0;
};

class MyWidgetState : public EditorState {
    Q_OBJECT
public:
    QString getTypeName() const override { return QStringLiteral("MyWidget"); }
    std::string toJson() const override;
    bool fromJson(std::string const & json) override;

    // Typed accessors
    std::string selectedKey() const { return _data.selected_key; }
    void setSelectedKey(std::string const & key);

signals:
    void selectedKeyChanged(QString const & key);

private:
    MyWidgetStateData _data;
};

2. DataManager + Observer — Shared Data and Change Notifications

DataManager is the central data store. It holds all data objects (PointData, LineData, TensorData, etc.) in a std::map<std::string, Variant>. Any widget that reads or writes data interacts with DataManager.

Detailed references:

Registering an Observer

When your widget needs to react to data changes (new objects added, existing objects modified), register an observer callback:

// In your widget's setDataManager() or constructor:
_observer_id = _data_manager->addObserver([this]() {
    // Data changed — refresh our UI
    _refreshDisplay();
});
ImportantCleanup Is Mandatory

Always store the returned CallbackID and remove the observer in your destructor. Failing to do this causes dangling callbacks and crashes.

MyWidget::~MyWidget()
{
    if (_data_manager && _observer_id >= 0) {
        _data_manager->removeObserver(_observer_id);
    }
}

If setDataManager() can be called more than once (e.g. widget is reused), also remove the previous observer before registering a new one.

Thread-Safety: The QTimer::singleShot Pattern

Observer callbacks fire on whatever thread calls notifyObservers(). If a background worker modifies DataManager, your callback runs on the worker thread — but Qt widget operations must happen on the main thread. The standard fix:

_observer_id = _data_manager->addObserver([this]() {
    QTimer::singleShot(0, this, [this]() {
        // This body runs on the main thread, and is automatically
        // cancelled if 'this' widget is destroyed before it fires.
        _refreshDisplay();
    });
});

This pattern is already used by MLCoreWidget’s panels. See the Observer Thread-Safety Roadmap for the full list of safe vs. unsafe callbacks.

Reading and Writing Data

// Reading
auto tensor = _data_manager->getData<TensorData>("my_tensor_key");
if (tensor) {
    auto const & mat = tensor->getDataAsArma();
    // Use the data...
}

// Writing
_data_manager->setData<TensorData>("output_key", std::move(new_data));
// This triggers notifyObservers() — all registered callbacks fire.

For mutation operations that should be serializable and undoable, use the Command Architecture instead of calling setData() directly. See §3 Commands below.

Handling Key Deletion (Required Pattern)

When DataManager::deleteData(key) runs, the key is removed and all global observers fire. Every plot widget that references DataManager keys must subscribe to this event and prune stale references. Failing to do this causes dangling keys, getData() calls on missing objects, or stale GPU batches.

ImportantMandatory for New Plot Widgets

All new plot widgets must implement the observer + prune pattern described below.

Step 1: Add a member to store the observer ID

int _dm_observer_id{-1};

Step 2: Register in setState()

if (_data_manager && _dm_observer_id == -1) {
    _dm_observer_id = _data_manager->addObserver([this]() {
        _pruneRemovedKeys();
    });
}

Step 3: Implement _pruneRemovedKeys()

Get the current key set from DataManager and remove any state references that no longer exist:

void MyWidget::_pruneRemovedKeys() {
    if (!_state || !_data_manager) { return; }
    auto const all_keys = _data_manager->getAllKeys();
    std::set<std::string> const key_set(all_keys.begin(), all_keys.end());

    // For each key your state references, check existence and clear if missing:
    auto const key = _state->getDataKey().toStdString();
    if (!key.empty() && key_set.find(key) == key_set.end()) {
        _state->setDataKey(QString());
    }
}

For widgets with multiple keys (e.g. plot series), iterate and collect removals before mutating:

std::vector<QString> to_remove;
for (auto const & name : _state->getSeriesNames()) {
    auto opts = _state->getSeriesOptions(name);
    if (opts && key_set.find(opts->data_key) == key_set.end()) {
        to_remove.push_back(name);
    }
}
for (auto const & name : to_remove) {
    _state->removeSeries(name);
}

Step 4: Unregister in destructor

MyWidget::~MyWidget() {
    if (_data_manager && _dm_observer_id != -1) {
        _data_manager->removeObserver(_dm_observer_id);
    }
}

Reference implementations: PSTHWidget, EventPlotWidget, HeatmapWidget (full per-key callback management + pruning). Simpler single-key pattern: SpectrogramWidget, ACFWidget.

3. Command Architecture — Serializable Data Mutations

The Command Architecture represents DataManager operations as ICommand objects. Commands are JSON-serializable, composable into sequences, and optionally undoable.

Detailed references:

When to Use Commands vs. Direct DataManager Calls

Scenario Use
Simple read + display Direct getData<T>() — no command needed
One-off write during development setData<T>() is fine initially
User-facing “button click” that modifies data Command — for undo, journaling, and pipeline composition
Multi-step workflow (triage, batch processing) Command sequence — serialize the whole workflow as JSON

Dispatching Commands from a Widget

#include "Commands/Core/ICommand.hpp"
#include "Commands/Core/SequenceExecution.hpp"

// Build the command descriptor (JSON-serializable)
auto descriptor = commands::CommandSequenceDescriptor{};
descriptor.steps.push_back({
    .command = "CopyByTimeRange",
    .params = rfl::json::write(CopyByTimeRangeParams{
        .source_key = "predicted_lines",
        .dest_key = "ground_truth_lines",
        .start_time = 1000,
        .end_time = 2000
    })
});

// Execute
auto ctx = commands::CommandContext{.data_manager = _data_manager};
auto result = commands::executeSequence(descriptor, ctx);
if (!result.result.success) {
    spdlog::error("Command failed: {}", result.result.error_message);
}

The Scope Boundary

Commands exist for data mutations only — operations that change what’s in DataManager. UI state changes (line color, zoom level, active tab) go through EditorState signals, not commands. This mirrors Blender’s Operator/viewport split: data changes are undoable; view changes are not.

4. ParameterSchema + AutoParamWidget — Auto-Generated Config Forms

When your widget has a settings struct (thresholds, modes, algorithm parameters), you can automatically generate a Qt form from it rather than hand-building spin boxes and combo boxes.

Detailed references:

  • Schema-Driven Forms — End-to-end narrative: reflect-cpp structs, simple vs complex consumers (PostEncoderWidget vs TransformsV2_Widget), and improvement patterns
  • ParameterSchema Library — Schema extraction, field descriptors, constraints
  • AutoParam System — The Qt widget that renders the form
  • Registry Patterns — Choosing a registry that exposes serializable parameters and generated forms

The Flow

C++ params struct          extractParameterSchema<T>()        AutoParamWidget
(with reflect-cpp)    ─────────────────────────────►    ────────────────────►  Qt form
                              ParameterSchema
  1. Define your parameters as a plain C++ struct compatible with reflect-cpp:
struct MyAlgorithmParams {
    float threshold = 0.5f;
    int iterations = 10;
    std::string mode = "Fast";
    bool verbose = false;
};
  1. Optionally add UI annotations via ParameterUIHints:
template<>
struct ParameterUIHints<MyAlgorithmParams> {
    static void annotate(ParameterSchema & schema) {
        if (auto * f = schema.field("threshold")) {
            f->tooltip = "Detection threshold (0.0 to 1.0)";
            f->min_value = 0.0;
            f->max_value = 1.0;
        }
        if (auto * f = schema.field("mode")) {
            f->allowed_values = {"Fast", "Accurate", "Debug"};
        }
    }
};
  1. Extract the schema and create the widget:
#include "ParameterSchema/ParameterSchema.hpp"
#include "AutoParamWidget/AutoParamWidget.hpp"

auto schema = extractParameterSchema<MyAlgorithmParams>();
auto * param_widget = new AutoParamWidget(schema, this);

connect(param_widget, &AutoParamWidget::parametersChanged,
        this, &MyWidget::_onParamsChanged);

AutoParamWidget maps types to widgets automatically:

C++ Type Qt Widget
float / double QDoubleSpinBox
int QSpinBox
bool QCheckBox
std::string QLineEdit or QComboBox (if allowed_values set)
std::optional<T> Checkbox-gated widget
enum class QComboBox (auto-detected)
rfl::TaggedUnion QComboBox + QStackedWidget (discriminated union)

Dynamic Combo Fields

If a combo box’s items come from DataManager (e.g., data key selection), use the dynamic combo pattern:

// In ParameterUIHints:
f->dynamic_combo = true;
f->include_none_sentinel = true;  // Prepend "(None)" → maps to ""

// At runtime, populate from DataManager:
auto keys = _data_manager->getKeys<TensorData>();
_param_widget->updateAllowedValues("source_key", keys);

5. Context Actions — Right-Click Integration

Context Actions let your widget advertise what it can do for the currently selected data. They appear in right-click context menus across the application.

Detailed reference: Inter-Widget Communication Roadmap — Layer 4

When to Use

Register a ContextAction when:

  • Your widget can process or visualize a particular data type
  • You want a one-click path from data selection to your widget
  • The action’s availability depends on the current selection state

Registering a Context Action

Context actions are registered via a static void registerContextActions(...) helper in the anonymous namespace at the top of your registration .cpp, called from registerTypes(). See § Registration File Organization for the full pattern.

The helper signature:

namespace {
static void registerContextActions(EditorRegistry * registry,
                                   std::shared_ptr<DataManager> const & dm) {
    auto * selection_ctx = registry->selectionContext();
    if (!selection_ctx) { return; }

    ContextAction action;
    action.action_id = QStringLiteral("my_widget.analyze_tensor");
    action.display_name = QStringLiteral("Analyze in My Widget");
    action.producer_type = EditorLib::EditorTypeId(QStringLiteral("MyWidget"));

    action.is_applicable = [dm](SelectionContext const & ctx) -> bool {
        // Only show for TensorData with 3+ columns
        if (ctx.dataFocusType() != QStringLiteral("TensorData")) return false;
        auto key = ctx.dataFocus().toStdString();
        auto tensor = dm->getData<TensorData>(key);
        return tensor && tensor->numColumns() >= 3;
    };

    action.execute = [registry](SelectionContext const & ctx) {
        // Open (or focus) an instance of MyWidget
        auto state = registry->openEditor(
                EditorLib::EditorTypeId(QStringLiteral("MyWidget")));
        // Configure it with the selected data
        if (auto my_state = std::dynamic_pointer_cast<MyWidgetState>(state)) {
            my_state->setInputKey(ctx.dataFocus().toStdString());
        }
    };

    selection_ctx->registerAction(std::move(action));
}
} // namespace

Distinction from Commands

Context Actions Commands
What they do Open/configure widgets (UI orchestration) Mutate data in DataManager
Serializable No (contain std::function) Yes (JSON via reflect-cpp)
Undoable No Optionally
Where registered SelectionContext::registerAction() CommandRegistry

A context action may call commands internally (e.g., “Cluster with K-Means” opens MLCoreWidget, which eventually dispatches a clustering command). The action itself is the UI glue; the command is the data operation.

6. Keymap System — Configurable Keyboard Shortcuts

The Keymap System provides configurable, context-aware keyboard shortcuts. It replaces the ad-hoc keyPressEvent() overrides scattered across widgets.

Detailed reference: Keymap System

Note

The Keymap System is currently in design/early implementation. The patterns described here reflect the planned architecture. Check the Keymap Roadmap for current status.

Core Concepts

Scope resolution order (first match wins):

  1. Text input bypass — If focus is in a QLineEdit/QTextEdit, the key goes to Qt normally
  2. Focused-editor keymap — Actions for the widget type that currently has focus
  3. Always-routed keymap — Actions that always go to a specific widget (e.g. Space → play/pause)
  4. Global keymap — Actions not tied to any editor (e.g. focus-switching hotkeys)

Registering Actions

Action descriptors (pure metadata) are registered via a static void registerEditorActions(KeymapSystem::KeymapManager * km) helper in the anonymous namespace at the top of your registration .cpp, called from registerTypes(). See § Registration File Organization for the full pattern.

The helper signature:

namespace {
static void registerEditorActions(KeymapSystem::KeymapManager * km) {
    if (!km) { return; }
    auto const scope = KeyActionScope::editorFocused(
            EditorTypeId(QStringLiteral("MyWidget")));
    km->registerAction({
        .action_id = QStringLiteral("my_widget.do_something"),
        .display_name = QStringLiteral("Do Something"),
        .category = QStringLiteral("My Widget"),
        .scope = scope,
        .default_binding = QKeySequence(Qt::Key_D)
    });
    // Actions with no shipped default — user-assignable only:
    km->registerAction({
        .action_id = QStringLiteral("my_widget.export_svg"),
        .display_name = QStringLiteral("Export as SVG"),
        .category = QStringLiteral("My Widget"),
        .scope = scope,
        .default_binding = {}  // intentionally unbound
    });
}
} // namespace
TipRegistering “potential” actions without a default key

Not every action needs a shipped default key. If a feature is useful but not common enough to warrant a pre-assigned shortcut, register the descriptor with default_binding = {} (a default-constructed QKeySequence).

The action still appears in the Keybinding Editor under its category with “(unbound)” shown, and the user can assign any key they want. The assigned binding is persisted via AppPreferencesData::keybinding_overrides and survives restarts.

The KeyActionAdapter handler is wired up normally — it simply will not fire until the user assigns a key. There is no special “potential” flag or separate API; the only difference is an empty default_binding.

Handling Actions at Runtime

When your widget is instantiated, create a KeyActionAdapter (composition, not inheritance):

// In MyWidget constructor:
_key_adapter = new KeyActionAdapter(this);  // QObject parenting handles cleanup
_key_adapter->setInstanceId(_state->getInstanceId());
_key_adapter->setHandler([this](QString const & action_id) -> bool {
    if (action_id == QStringLiteral("my_widget.do_something")) {
        doSomething();
        return true;  // Handled
    }
    return false;  // Not handled — let dispatch continue
});
keymap_manager->registerAdapter(_key_adapter);

Deregistration is automatic via QObject::destroyed — when your widget (the adapter’s parent) is destroyed, KeymapManager cleans up.

Scope Types

Scope Use When
EditorFocused("MyWidget") Action only makes sense when your widget has keyboard focus
AlwaysRouted("TimeScrollBar") Action should always go to a specific widget regardless of focus
Global Action is not tied to any particular widget

DataFocusAware — Reacting to Selection Changes

A cross-cutting concern: if your widget should update when the user selects a different data key elsewhere (e.g., clicking a row in the Data Manager tree), implement DataFocusAware:

class MyWidget : public QWidget, public DataFocusAware {
public:
    MyWidget(SelectionContext * ctx, /* ... */) {
        connectToSelectionContext(ctx, this);
    }

    void onDataFocusChanged(EditorLib::SelectedDataKey const & key,
                            QString const & data_type) override
    {
        if (data_type == QStringLiteral("TensorData")) {
            _loadTensor(key.toStdString());
        }
    }
};

The SelectionSource parameter in the underlying signal prevents circular updates — if your widget sets the data focus, it won’t immediately react to its own change.

OperationContext — Inter-Widget Request/Response

When one widget needs structured data from another (e.g., a column config dialog requests a pipeline from the Transforms V2 editor), use OperationContext.

Detailed reference: Inter-Widget Communication Roadmap — Layer 3

As a Consumer (Requesting Data)

auto result = _operation_context->requestOperation(
    EditorLib::EditorInstanceId(_my_instance_id),
    EditorLib::EditorTypeId(QStringLiteral("TransformsV2Widget")),
    EditorLib::OperationRequestOptions{
        .channel = EditorLib::DataChannels::TransformPipeline,
        .keep_open_for_iteration = true
    });

Connect to operationDelivered and operationClosed signals to receive the response.

As a Producer (Providing Data)

Your widget checks for pending operations and shows a “Send to [requester]” button when one is active. When the user clicks it, call:

_operation_context->deliverResult(operation_id, result_payload);

Checklist: Creating a New Widget

Here is a step-by-step checklist for adding a new widget:

Minimum Viable Widget

Data Integration

Optional: Command Integration

Optional: Auto-Generated Parameter Forms

Optional: Context Actions

Optional: Keyboard Shortcuts

Optional: DataFocusAware

Optional: OperationContext