fabric/datatypeselector.h

fabric/datatypeselector.h

fabric/datatypeselector.h

Namespaces

Name
Syntalos

Classes

Name
classSyntalos::DataTypeSelector
Combo box for selecting a single stream data type.

Source code

/*
 * Copyright (C) 2025-2026 Matthias Klumpp <matthias@tenstral.net>
 *
 * Licensed under the GNU Lesser General Public License Version 3
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the license, or
 * (at your option) any later version.
 *
 * This software is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this software.  If not, see <http://www.gnu.org/licenses/>.
 */

#pragma once

#include <QComboBox>

namespace Syntalos
{

class DataTypeSelector : public QComboBox
{
    Q_OBJECT
public:
    explicit DataTypeSelector(QWidget *parent = nullptr);

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

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

    void addAllDataTypes();

    int selectedTypeId() const;
    void setSelectedTypeId(int typeId);

    QString selectedTypeName() const;
    void setSelectedTypeName(const QString &typeName);

Q_SIGNALS:
    void selectionChanged();
};

} // namespace Syntalos

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