Skip to main content

DataImportTypeRegistry

DataImportTypeRegistry

Singleton registry mapping data types to import widget factories. More…

#include <DataImportTypeRegistry.hpp>

Public Functions

Name
DataImportTypeRegistry & instance()
Get the singleton instance.
DataImportTypeRegistry(DataImportTypeRegistry const & ) =delete
DataImportTypeRegistry & operator=(DataImportTypeRegistry const & ) =delete
DataImportTypeRegistry(DataImportTypeRegistry && ) =delete
DataImportTypeRegistry & operator=(DataImportTypeRegistry && ) =delete
void registerType(QString const & data_type, ImportWidgetFactory factory)
Register an import widget factory for a data type.
bool hasType(QString const & data_type) const
Check if a data type has a registered import widget.
QWidget * createWidget(QString const & data_type, std::shared_ptr< DataManager > dm, QWidget * parent =[nullptr]) const
Create an import widget for a data type.
QStringList supportedTypes() const
Get list of all registered data types.
QString displayName(QString const & data_type) const
Get display name for a data type.

Detailed Description

class DataImportTypeRegistry;

Singleton registry mapping data types to import widget factories.

Thread safety: Registration should happen at static initialization time. Widget creation happens on the main thread.

Public Functions Documentation

function instance

static DataImportTypeRegistry & instance()

Get the singleton instance.

Return: Reference to the registry

function DataImportTypeRegistry

DataImportTypeRegistry(
    DataImportTypeRegistry const & 
) =delete

function operator=

DataImportTypeRegistry & operator=(
    DataImportTypeRegistry const & 
) =delete

function DataImportTypeRegistry

DataImportTypeRegistry(
    DataImportTypeRegistry && 
) =delete

function operator=

DataImportTypeRegistry & operator=(
    DataImportTypeRegistry && 
) =delete

function registerType

void registerType(
    QString const & data_type,
    ImportWidgetFactory factory
)

Register an import widget factory for a data type.

Parameters:

  • data_type Data type identifier (e.g., “LineData”, “MaskData”)
  • factory Factory structure with display name and creation function

function hasType

bool hasType(
    QString const & data_type
) const

Check if a data type has a registered import widget.

Parameters:

  • data_type Data type to check

Return: true if registered

function createWidget

QWidget * createWidget(
    QString const & data_type,
    std::shared_ptr< DataManager > dm,
    QWidget * parent =nullptr
) const

Create an import widget for a data type.

Parameters:

  • data_type Data type to create widget for
  • dm DataManager for data access
  • parent Parent widget for Qt ownership

Return: Newly created widget, or nullptr if type not registered

function supportedTypes

QStringList supportedTypes() const

Get list of all registered data types.

Return: List of registered type strings

function displayName

QString displayName(
    QString const & data_type
) const

Get display name for a data type.

Parameters:

  • data_type Data type to look up

Return: Display name, or empty string if not registered


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