mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-22 01:44:49 -05:00
The "core" macro conditions and actions have been extracted out to the "base" plugin. The library now mostly contains functionality which is required across all plugins and (e.g. definitions for macro segments). The goal is to reduce the complexity and cross-dependencies and group the source files in a better way. This should relsove the "library limit of 65535 objects exceeded" build issue occuring in some Windows build environments.
51 lines
1.1 KiB
C++
51 lines
1.1 KiB
C++
#pragma once
|
|
#include "filter-combo-box.hpp"
|
|
|
|
#include <obs.hpp>
|
|
|
|
namespace advss {
|
|
|
|
class TransitionSelection {
|
|
public:
|
|
void Save(obs_data_t *obj, const char *name = "transition",
|
|
const char *typeName = "transitionType") const;
|
|
void Load(obs_data_t *obj, const char *name = "transition",
|
|
const char *typeName = "transitionType");
|
|
|
|
enum class Type {
|
|
TRANSITION,
|
|
CURRENT,
|
|
ANY,
|
|
};
|
|
|
|
Type GetType() const { return _type; }
|
|
OBSWeakSource GetTransition() const;
|
|
std::string ToString() const;
|
|
|
|
private:
|
|
OBSWeakSource _transition;
|
|
Type _type = Type::TRANSITION;
|
|
friend class TransitionSelectionWidget;
|
|
};
|
|
|
|
class TransitionSelectionWidget : public FilterComboBox {
|
|
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);
|
|
};
|
|
|
|
} // namespace advss
|