Skip to main content

ParamWidgetRegistry

ParamWidgetRegistry

Singleton registry for custom parameter widget factories. More…

#include <ParamWidgetRegistry.hpp>

Public Types

Name
using std::function< QWidget (QWidget parent)> WidgetFactory

Public Functions

Name
ParamWidgetRegistry & instance()
Get global singleton instance.
template <typename Params >
void
registerCustomWidget(WidgetFactory factory)
Register a custom widget factory for a parameter type.
bool hasCustomWidget(std::type_index params_type) const
Check if a custom widget is registered for a params type.
QWidget * createCustomWidget(std::type_index params_type, QWidget * parent) const
Create a custom widget for a params type, or nullptr if none registered.
template <typename Params >
QWidget *
createCustomWidget(QWidget * parent) const
Templated convenience for creating a custom widget.

Detailed Description

class ParamWidgetRegistry;

Singleton registry for custom parameter widget factories.

The pipeline builder checks this registry first. If a custom widget is registered for a parameter type, it is used. Otherwise, the AutoParamWidget is used as the default form generator.

Public Types Documentation

using WidgetFactory

using ParamWidgetRegistry::WidgetFactory =  std::function<QWidget *(QWidget * parent)>;

Public Functions Documentation

function instance

static inline ParamWidgetRegistry & instance()

Get global singleton instance.

function registerCustomWidget

template <typename Params >
inline void registerCustomWidget(
    WidgetFactory factory
)

Register a custom widget factory for a parameter type.

Parameters:

  • factory Lambda/function that creates the custom widget

Template Parameters:

  • Params The parameter struct type

function hasCustomWidget

inline bool hasCustomWidget(
    std::type_index params_type
) const

Check if a custom widget is registered for a params type.

function createCustomWidget

inline QWidget * createCustomWidget(
    std::type_index params_type,
    QWidget * parent
) const

Create a custom widget for a params type, or nullptr if none registered.

function createCustomWidget

template <typename Params >
inline QWidget * createCustomWidget(
    QWidget * parent
) const

Templated convenience for creating a custom widget.


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