Files
SceneSwitcher/src/headers/switch-generic.hpp
WarmUpTill 214821b69f 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
2020-10-31 16:25:44 +01:00

51 lines
1.1 KiB
C++

#pragma once
#include <obs.hpp>
#include <QComboBox>
struct SceneSwitcherEntry {
OBSWeakSource scene = nullptr;
OBSWeakSource transition = nullptr;
bool usePreviousScene = false;
virtual const char *getType() = 0;
virtual bool initialized();
virtual bool valid();
virtual void logMatch();
inline SceneSwitcherEntry() {}
inline SceneSwitcherEntry(OBSWeakSource scene_,
OBSWeakSource transition_,
bool usePreviousScene_ = false)
: scene(scene_),
transition(transition_),
usePreviousScene(usePreviousScene_)
{
}
virtual ~SceneSwitcherEntry() {}
};
class SwitchWidget : public QWidget {
Q_OBJECT
public:
SwitchWidget(SceneSwitcherEntry *s, bool usePreviousScene = true);
virtual SceneSwitcherEntry *getSwitchData();
virtual void setSwitchData(SceneSwitcherEntry *s);
static void swapSwitchData(SwitchWidget *s1, SwitchWidget *s2);
private slots:
void SceneChanged(const QString &text);
void TransitionChanged(const QString &text);
protected:
bool loading = true;
QComboBox *scenes;
QComboBox *transitions;
SceneSwitcherEntry *switchData;
};