UI rework (#44)

* rework general tab UI

* rework audio tab UI

* rework media tab UI

* rework time tab UI

* rework random tab UI

* rework window tab UI

* rework sreen region tab UI

* rework sequence tab UI

* rework transition tab UI

* adjust log messages to new format

* fix include path and warning

* highlight widgets to guide users (can be disabled)

* add helper frame for screen region tab

* rename main SceneSwitcher widget to AdvSceneSwitcher to resolve naming conflicts with the frontend tools on certain platforms (e.g. Debian 10)

* add media state 'any'

* adjust media switch handling to support vlc source
This commit is contained in:
WarmUpTill
2020-10-31 16:25:44 +01:00
committed by GitHub
parent 7edb6eb6c1
commit 214821b69f
35 changed files with 3975 additions and 4131 deletions

View File

@@ -1,20 +1,19 @@
#pragma once
#include <string>
#include "utility.hpp"
#include <QCheckBox>
#include "switch-generic.hpp"
constexpr auto exe_func = 3;
constexpr auto default_priority_3 = exe_func;
struct ExecutableSceneSwitch : SceneSwitcherEntry {
QString exe;
bool inFocus;
struct ExecutableSwitch : SceneSwitcherEntry {
QString exe = "";
bool inFocus = false;
const char *getType() { return "exec"; }
inline ExecutableSceneSwitch(OBSWeakSource scene_,
OBSWeakSource transition_,
const QString &exe_, bool inFocus_)
inline ExecutableSwitch(){};
inline ExecutableSwitch(OBSWeakSource scene_, OBSWeakSource transition_,
const QString &exe_, bool inFocus_)
: SceneSwitcherEntry(scene_, transition_),
exe(exe_),
inFocus(inFocus_)
@@ -22,7 +21,28 @@ struct ExecutableSceneSwitch : SceneSwitcherEntry {
}
};
static inline QString MakeSwitchNameExecutable(const QString &scene,
const QString &value,
const QString &transition,
bool inFocus);
class ExecutableSwitchWidget : public SwitchWidget {
Q_OBJECT
public:
ExecutableSwitchWidget(ExecutableSwitch *s);
ExecutableSwitch *getSwitchData();
void setSwitchData(ExecutableSwitch *s);
static void swapSwitchData(ExecutableSwitchWidget *s1,
ExecutableSwitchWidget *s2);
private slots:
void ProcessChanged(const QString &text);
void FocusChanged(int state);
private:
QComboBox *processes;
QCheckBox *requiresFocus;
QLabel *whenLabel;
QLabel *switchLabel;
QLabel *usingLabel;
ExecutableSwitch *switchData;
};