// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute // SPDX-License-Identifier: GPL-3.0-only #ifndef JFJOCH_NUMERICCOMBOBOX_H #define JFJOCH_NUMERICCOMBOBOX_H #include class NumericComboBox : public QComboBox { Q_OBJECT QIntValidator *validator; public: NumericComboBox(std::vector options, int min = 0, int max = 100, QWidget *parent = nullptr); int getValue() const; void setValue(int value); signals: void valueChanged(int value); private slots: void onCurrentIndexChanged(int index); void onEditTextChanged(const QString &text); }; #endif //JFJOCH_NUMERICCOMBOBOX_H