Syntalos::DataTypeSelector

Syntalos::DataTypeSelector

Syntalos::DataTypeSelector

Combo box for selecting a single stream data type. More…

#include <datatypeselector.h>

Inherits from QComboBox

Public Signals

Name
voidselectionChanged()

Public Functions

Name
DataTypeSelector(QWidget * parent =nullptr)
voidaddNoneEntry(const QString & label =QStringLiteral(“None”))
Add a “None” entry, mapping to BaseDataType::Unknown.
voidaddDataType(int typeId, const QString & label =QString())
Add a single supported stream type.
voidaddAllDataTypes()
Add every registered stream type, labelled by its type name.
intselectedTypeId() const
TypeId of the current selection (BaseDataType::Unknown if “None”).
voidsetSelectedTypeId(int typeId)
QStringselectedTypeName() const
Canonical type name of the current selection, for serialization.
voidsetSelectedTypeName(const QString & typeName)

Detailed Description

class Syntalos::DataTypeSelector;

Combo box for selecting a single stream data type.

Many modules can only consume one input stream type at a time (writers, meters, …) and let the user pick which one. This widget centralizes that selection: it offers an optional “None” entry, lets the module advertise either a restricted set of supported types or every registered stream type, and (de)serializes the choice via the type’s canonical name.

Public Signals Documentation

signal selectionChanged

void selectionChanged()

Public Functions Documentation

function DataTypeSelector

explicit DataTypeSelector(
    QWidget * parent =nullptr
)

function addNoneEntry

void addNoneEntry(
    const QString & label =QStringLiteral("None")
)

Add a “None” entry, mapping to BaseDataType::Unknown.

Add this first for modules that may be left unconfigured (no input port).

function addDataType

void addDataType(
    int typeId,
    const QString & label =QString()
)

Add a single supported stream type.

Parameters:

  • typeId The BaseDataType::TypeId of the stream type.
  • label Optional display label; defaults to the type’s canonical name.

function addAllDataTypes

void addAllDataTypes()

Add every registered stream type, labelled by its type name.

function selectedTypeId

int selectedTypeId() const

TypeId of the current selection (BaseDataType::Unknown if “None”).

function setSelectedTypeId

void setSelectedTypeId(
    int typeId
)

function selectedTypeName

QString selectedTypeName() const

Canonical type name of the current selection, for serialization.

function setSelectedTypeName

void setSelectedTypeName(
    const QString & typeName
)

Updated on 2026-06-06 at 02:59:46 +0000