Refactor, fixes and maximized option for title tab (#40)

* move definitions of switcher structs to separate files

* remove useless comment

* cleanup and silence warnings

* add generic switch

* removed delay on main thread startup as it served no purpose

* clean up ultility.hpp

* do not save switchStr to file as it could cause issues when scenes are renamed

* rename sceneRoundTrip to sceneSequence

* add option to switch if window is maximized to title tab
This commit is contained in:
WarmUpTill
2020-09-25 21:42:58 +02:00
committed by GitHub
parent 1559d437ec
commit dd63ff846c
40 changed files with 1266 additions and 981 deletions

View File

@@ -0,0 +1,44 @@
#pragma once
#include <string>
#include "utility.hpp"
#include "switch-generic.hpp"
constexpr auto read_file_func = 0;
constexpr auto default_priority_0 = read_file_func;
struct FileSwitch : SceneSwitcherEntry {
std::string file;
std::string text;
bool remote = false;
bool useRegex = false;
bool useTime = false;
QDateTime lastMod;
const char *getType() { return "file"; }
inline FileSwitch(OBSWeakSource scene_, OBSWeakSource transition_,
const char *file_, const char *text_, bool remote_,
bool useRegex_, bool useTime_)
: SceneSwitcherEntry(scene_, transition_),
file(file_),
text(text_),
remote(remote_),
useRegex(useRegex_),
useTime(useTime_),
lastMod()
{
}
};
struct FileIOData {
bool readEnabled = false;
std::string readPath;
bool writeEnabled = false;
std::string writePath;
};
static inline QString MakeFileSwitchName(const QString &scene,
const QString &transition,
const QString &fileName,
const QString &text, bool useRegex,
bool useTime);