Restructure library and plugins

The "core" macro conditions and actions have been extracted out to the
"base" plugin.

The library now mostly contains functionality which is required across
all plugins and (e.g. definitions for macro segments).

The goal is to reduce the complexity and cross-dependencies and group
the source files in a better way.

This should relsove the "library limit of 65535 objects exceeded" build
issue occuring in some Windows build environments.
This commit is contained in:
WarmUpTill
2024-01-17 16:22:55 +01:00
committed by WarmUpTill
parent 498bf31295
commit 7d0332dd0e
390 changed files with 3110 additions and 2755 deletions

View File

@@ -0,0 +1,57 @@
#pragma once
#include "filter-combo-box.hpp"
#include <obs.hpp>
#include <string>
#include <vector>
#include <QWidget>
#include <QLabel>
namespace advss {
class SourceSetting {
public:
SourceSetting() = default;
SourceSetting(const std::string &id, const std::string &description,
const std::string &longDescription = "");
bool Save(obs_data_t *obj) const;
bool Load(obs_data_t *obj);
std::string GetID() const { return _id; }
EXPORT bool operator==(const SourceSetting &other) const;
private:
std::string _id = "";
std::string _description = "";
std::string _longDescription = "";
friend class SourceSettingSelection;
};
std::vector<SourceSetting> GetSoruceSettings(obs_source_t *source);
std::string GetSourceSettingValue(const OBSWeakSource &source,
const SourceSetting &setting);
void SetSourceSetting(obs_source_t *source, const SourceSetting &setting,
const std::string &value);
class SourceSettingSelection : public QWidget {
Q_OBJECT
public:
SourceSettingSelection(QWidget *parent = nullptr);
void SetSource(const OBSWeakSource &);
void SetSetting(const SourceSetting &);
private slots:
void SelectionIdxChanged(int);
signals:
void SelectionChanged(const SourceSetting &);
private:
void Populate(const OBSWeakSource &);
FilterComboBox *_settings;
QLabel *_tooltip;
};
} // namespace advss