Add scene groups and rework save and load (#103)

This commit is contained in:
WarmUpTill
2021-01-23 17:39:35 +01:00
committed by GitHub
parent 1f4679433e
commit d989c2b570
38 changed files with 2182 additions and 636 deletions

View File

@@ -23,29 +23,15 @@ struct FileSwitch : SceneSwitcherEntry {
size_t lastHash = 0;
const char *getType() { return "file"; }
inline FileSwitch(){};
inline FileSwitch(OBSWeakSource scene_, OBSWeakSource transition_,
const char *file_, const char *text_, bool remote_,
bool useRegex_, bool useTime_,
bool onlyMatchIfChanged_)
: SceneSwitcherEntry(scene_, transition_),
file(file_),
text(text_),
remote(remote_),
useRegex(useRegex_),
useTime(useTime_),
onlyMatchIfChanged(onlyMatchIfChanged_),
lastMod()
{
}
void save(obs_data_t *obj);
void load(obs_data_t *obj);
};
class FileSwitchWidget : public SwitchWidget {
Q_OBJECT
public:
FileSwitchWidget(FileSwitch *s);
FileSwitchWidget(QWidget *parent, FileSwitch *s);
FileSwitch *getSwitchData();
void setSwitchData(FileSwitch *s);