Add option to search in variable tab

This commit is contained in:
WarmUpTill
2025-11-06 21:09:09 +01:00
committed by WarmUpTill
parent 661e83162f
commit f0f8b0fd92
3 changed files with 153 additions and 8 deletions

View File

@@ -1,5 +1,8 @@
#pragma once
#include "resource-table.hpp"
#include "regex-config.hpp"
#include <QComboBox>
namespace advss {
@@ -7,14 +10,31 @@ class VariableTable final : public ResourceTable {
Q_OBJECT
public:
static VariableTable *Create();
struct Settings {
void Save(obs_data_t *data, const char *name);
void Load(obs_data_t *data, const char *name);
enum SearchType { ALL = -1, NAME = 0, VALUE = 1 };
SearchType searchType = SearchType::ALL;
std::string searchString;
RegexConfig regex;
};
VariableTable(Settings &settings, QWidget *parent = nullptr);
static VariableTable *CreateTabTable();
private slots:
void Add();
void Remove();
void Filter();
private:
VariableTable(QTabWidget *parent = nullptr);
QLineEdit *_searchField;
QComboBox *_searchType;
RegexConfigWidget *_regexWidget;
Settings &_settings;
};
} // namespace advss