Restructure "src/" folder

Moving files from the "src/" folder into "src/legacy", "src/macro-core",
and "src/utils" was necessary as it was becoming a bit too cluttered.
This commit is contained in:
WarmUpTill
2022-08-14 04:10:30 +02:00
committed by WarmUpTill
parent 5ae9e18044
commit 53a5fa6ff4
224 changed files with 589 additions and 895 deletions

View File

@@ -0,0 +1,46 @@
#pragma once
#include "utility.hpp"
#include <QComboBox>
enum class TransitionSelectionType {
TRANSITION,
CURRENT,
ANY,
};
class TransitionSelection {
public:
void Save(obs_data_t *obj, const char *name = "transition",
const char *typeName = "transitionType");
void Load(obs_data_t *obj, const char *name = "transition",
const char *typeName = "transitionType");
TransitionSelectionType GetType() { return _type; }
OBSWeakSource GetTransition();
std::string ToString();
private:
OBSWeakSource _transition;
TransitionSelectionType _type = TransitionSelectionType::TRANSITION;
friend class TransitionSelectionWidget;
};
class TransitionSelectionWidget : public QComboBox {
Q_OBJECT
public:
TransitionSelectionWidget(QWidget *parent, bool current = true,
bool any = false);
void SetTransition(TransitionSelection &);
void Repopulate(bool current, bool any);
signals:
void TransitionChanged(const TransitionSelection &);
private slots:
void SelectionChanged(const QString &name);
private:
bool IsCurrentTransitionSelected(const QString &name);
bool IsAnyTransitionSelected(const QString &name);
};