mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-12 20:28:11 -05:00
Add option to search in variable tab
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user