Add ValueInputWidget

This commit is contained in:
WarmUpTill
2026-10-11 12:05:42 +02:00
committed by WarmUpTill
parent 81683d1945
commit b9be64a853
4 changed files with 199 additions and 0 deletions

38
lib/utils/value-input.hpp Normal file
View File

@@ -0,0 +1,38 @@
#pragma once
#include "export-symbol-helper.hpp"
#include <functional>
#include <QStringList>
#include <QWidget>
#include <string>
class QComboBox;
namespace advss {
enum class ValueInputType {
File,
Folder,
Scene,
Source,
String,
Variable,
Selection,
};
void PopulateValueInputTypeSelection(QComboBox *list);
class ValueInputWidget : public QWidget {
Q_OBJECT
public:
ValueInputWidget(ValueInputType type, const std::string &defaultValue,
const QStringList &options = {},
QWidget *parent = nullptr);
std::string Value() const;
private:
std::function<std::string()> _getValue;
};
} // namespace advss