mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-21 17:34:57 -05:00
Add advss namespace
Fixes name conflict with "Duration" class and typedef of the same name on MacOS
This commit is contained in:
parent
b7479e8342
commit
2c5caabab0
|
|
@ -658,7 +658,7 @@
|
|||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="MacroTree" name="macros">
|
||||
<widget class="advss::MacroTree" name="macros">
|
||||
<property name="showDropIndicator" stdset="0">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
|
|
@ -4563,7 +4563,7 @@
|
|||
</widget>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
<class>MacroTree</class>
|
||||
<class>advss::MacroTree</class>
|
||||
<extends>QListView</extends>
|
||||
<header>macro-tree.hpp</header>
|
||||
</customwidget>
|
||||
|
|
|
|||
|
|
@ -14,18 +14,7 @@
|
|||
#include "utility.hpp"
|
||||
#include "version.h"
|
||||
|
||||
const char *obs_module_text(const char *text)
|
||||
{
|
||||
if (!switcher) {
|
||||
return "";
|
||||
}
|
||||
return switcher->translate(text);
|
||||
}
|
||||
|
||||
obs_module_t *obs_current_module()
|
||||
{
|
||||
return switcher->modulePtr;
|
||||
}
|
||||
namespace advss {
|
||||
|
||||
SwitcherData *switcher = nullptr;
|
||||
SwitcherData *GetSwitcher()
|
||||
|
|
@ -762,3 +751,18 @@ extern "C" void InitSceneSwitcher(obs_module_t *m, translateFunc t)
|
|||
obs_module_text("AdvSceneSwitcher.pluginName"));
|
||||
action->connect(action, &QAction::triggered, OpenSettingsWindow);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
||||
const char *obs_module_text(const char *text)
|
||||
{
|
||||
if (!advss::switcher) {
|
||||
return "";
|
||||
}
|
||||
return advss::switcher->translate(text);
|
||||
}
|
||||
|
||||
obs_module_t *obs_current_module()
|
||||
{
|
||||
return advss::switcher->modulePtr;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,6 +12,9 @@
|
|||
}
|
||||
|
||||
class QCloseEvent;
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionEdit;
|
||||
class MacroConditionEdit;
|
||||
|
||||
|
|
@ -343,3 +346,5 @@ void AskForBackup(obs_data_t *obj);
|
|||
struct SwitcherData;
|
||||
extern SwitcherData *switcher;
|
||||
SwitcherData *GetSwitcher();
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#include <QFileDialog>
|
||||
#include <QStandardPaths>
|
||||
|
||||
namespace advss {
|
||||
|
||||
void AdvSceneSwitcher::reject()
|
||||
{
|
||||
close();
|
||||
|
|
@ -1074,3 +1076,5 @@ void AdvSceneSwitcher::setupGeneralTab()
|
|||
|
||||
setWindowTitle(windowTitle() + " - " + g_GIT_TAG);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <fstream>
|
||||
#include <regex>
|
||||
|
||||
namespace advss {
|
||||
|
||||
std::vector<std::weak_ptr<Hotkey>> Hotkey::_registeredHotkeys = {};
|
||||
uint32_t Hotkey::_hotkeyCounter = 1;
|
||||
|
||||
|
|
@ -249,3 +251,5 @@ void SwitcherData::loadHotkeys(obs_data_t *obj)
|
|||
loadHotkey(obj, downMacroSegment, "downMacroSegmentHotkey");
|
||||
loadHotkey(obj, removeMacroSegment, "removeMacroSegmentHotkey");
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <vector>
|
||||
#include <chrono>
|
||||
|
||||
namespace advss {
|
||||
|
||||
extern bool canSimulateKeyPresses;
|
||||
|
||||
class Hotkey {
|
||||
|
|
@ -162,3 +164,5 @@ enum class HotkeyType {
|
|||
};
|
||||
|
||||
void registerHotkeys();
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool SceneTrigger::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -569,3 +571,5 @@ void SceneTriggerWidget::AudioSourceChanged(const QString &text)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->audioSource = GetWeakSourceByQString(text);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include "switch-generic.hpp"
|
||||
#include "duration-control.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class sceneTriggerType {
|
||||
NONE = 0,
|
||||
SCENE_ACTIVE = 1,
|
||||
|
|
@ -82,3 +84,5 @@ private:
|
|||
|
||||
SceneTrigger *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "volume-control.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool AudioSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -611,3 +613,5 @@ void AudioSwitchFallbackWidget::DurationChanged(const Duration &dur)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->duration = dur;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -13,6 +13,8 @@
|
|||
#include "duration-control.hpp"
|
||||
#include "volume-control.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto audio_func = 8;
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -103,3 +105,5 @@ private:
|
|||
|
||||
AudioSwitchFallback *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool ExecutableSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -272,3 +274,5 @@ void ExecutableSwitchWidget::FocusChanged(int state)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->inFocus = state;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#include <QCheckBox>
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto exe_func = 3;
|
||||
|
||||
struct ExecutableSwitch : SceneSwitcherEntry {
|
||||
|
|
@ -42,3 +44,5 @@ private:
|
|||
|
||||
ExecutableSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include "curl-helper.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool FileSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
static std::hash<std::string> strHash;
|
||||
|
|
@ -665,3 +667,5 @@ void FileSwitchWidget::CheckFileContentChanged(int state)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->onlyMatchIfChanged = state;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
#include <QPlainTextEdit>
|
||||
#include <obs-module.h>
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto read_file_func = 0;
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -77,3 +79,5 @@ static inline QString MakeFileSwitchName(const QString &scene,
|
|||
const QString &fileName,
|
||||
const QString &text, bool useRegex,
|
||||
bool useTime, bool onlyMatchIfChanged);
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
static inline bool SceneGroupValid(SceneGroup *group)
|
||||
{
|
||||
if (group) {
|
||||
|
|
@ -300,3 +302,5 @@ void SwitchWidget::TransitionChanged(const QString &text)
|
|||
switchData->transition = GetWeakTransitionByQString(text);
|
||||
switchData->useCurrentTransition = switchData->transition == nullptr;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include "scene-group.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class SwitchTargetType {
|
||||
Scene,
|
||||
SceneGroup,
|
||||
|
|
@ -95,3 +97,5 @@ protected:
|
|||
|
||||
SceneSwitcherEntry *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool IdleData::pause = false;
|
||||
IdleWidget *idleWidget = nullptr;
|
||||
|
||||
|
|
@ -285,3 +287,5 @@ void IdleWidget::DurationChanged(int dur)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switcher->idleData.time = dur;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#pragma once
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto default_idle_time = 60;
|
||||
constexpr auto idle_func = 2;
|
||||
|
||||
|
|
@ -36,3 +38,5 @@ private:
|
|||
|
||||
IdleData *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool MediaSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -560,3 +562,5 @@ void MediaSwitchWidget::TimeChanged(int time)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->time = time;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#pragma once
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto media_func = 6;
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -83,3 +85,5 @@ private:
|
|||
|
||||
MediaSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@ Most of this code is based on https://github.com/Palakis/obs-websocket
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
#define PARAM_SERVER_ENABLE "ServerEnabled"
|
||||
#define PARAM_SERVER_PORT "ServerPort"
|
||||
#define PARAM_LOCKTOIPV4 "LockToIPv4"
|
||||
|
|
@ -124,10 +126,9 @@ WSServer::WSServer() : QObject(nullptr), _connections(), _clMutex()
|
|||
_server.set_reuse_addr(true);
|
||||
#endif
|
||||
|
||||
_server.set_open_handler(bind(&WSServer::onOpen, this, ::_1));
|
||||
_server.set_close_handler(bind(&WSServer::onClose, this, ::_1));
|
||||
_server.set_message_handler(
|
||||
bind(&WSServer::onMessage, this, ::_1, ::_2));
|
||||
_server.set_open_handler(bind(&WSServer::onOpen, this, _1));
|
||||
_server.set_close_handler(bind(&WSServer::onClose, this, _1));
|
||||
_server.set_message_handler(bind(&WSServer::onMessage, this, _1, _2));
|
||||
}
|
||||
|
||||
WSServer::~WSServer()
|
||||
|
|
@ -361,11 +362,10 @@ WSClient::WSClient() : QObject(nullptr)
|
|||
_client.set_reuse_addr(true);
|
||||
#endif
|
||||
|
||||
_client.set_open_handler(bind(&WSClient::onOpen, this, ::_1));
|
||||
_client.set_fail_handler(bind(&WSClient::onFail, this, ::_1));
|
||||
_client.set_message_handler(
|
||||
bind(&WSClient::onMessage, this, ::_1, ::_2));
|
||||
_client.set_close_handler(bind(&WSClient::onClose, this, ::_1));
|
||||
_client.set_open_handler(bind(&WSClient::onOpen, this, _1));
|
||||
_client.set_fail_handler(bind(&WSClient::onFail, this, _1));
|
||||
_client.set_message_handler(bind(&WSClient::onMessage, this, _1, _2));
|
||||
_client.set_close_handler(bind(&WSClient::onClose, this, _1));
|
||||
}
|
||||
|
||||
WSClient::~WSClient()
|
||||
|
|
@ -709,3 +709,5 @@ Compatability::StdFunctionRunnable::StdFunctionRunnable(
|
|||
: cb(std::move(func))
|
||||
{
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ Most of this code is based on https://github.com/Palakis/obs-websocket
|
|||
#include <websocketpp/server.hpp>
|
||||
#include <websocketpp/client.hpp>
|
||||
|
||||
namespace advss {
|
||||
|
||||
using websocketpp::connection_hdl;
|
||||
typedef websocketpp::server<websocketpp::config::asio> server;
|
||||
typedef websocketpp::client<websocketpp::config::asio_client> client;
|
||||
|
|
@ -131,3 +133,5 @@ public:
|
|||
|
||||
QRunnable *CreateFunctionRunnable(std::function<void()> func);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
void AdvSceneSwitcher::on_pauseAdd_clicked()
|
||||
|
|
@ -410,3 +412,5 @@ bool PauseEntry::valid()
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#pragma once
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class PauseType {
|
||||
Scene,
|
||||
Window,
|
||||
|
|
@ -70,3 +72,5 @@ private:
|
|||
|
||||
PauseEntry *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
#include "advanced-scene-switcher.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
void AdvSceneSwitcher::on_threadPriority_currentTextChanged(const QString &text)
|
||||
{
|
||||
if (loading || ui->threadPriority->count() !=
|
||||
|
|
@ -76,3 +78,5 @@ bool SwitcherData::prioFuncsValid()
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool RandomSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -220,3 +222,5 @@ void RandomSwitchWidget::DelayChanged(double d)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->delay = d;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#pragma once
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
struct RandomSwitch : SceneSwitcherEntry {
|
||||
static bool pause;
|
||||
double delay = 0.0;
|
||||
|
|
@ -36,3 +38,5 @@ private:
|
|||
|
||||
RandomSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool ScreenRegionSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -455,3 +457,5 @@ void ScreenRegionWidget::drawFrame()
|
|||
switchData->maxY - switchData->minY);
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#include <QSpinBox>
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto screen_region_func = 4;
|
||||
|
||||
struct ScreenRegionSwitch : SceneSwitcherEntry {
|
||||
|
|
@ -55,3 +57,5 @@ private:
|
|||
|
||||
void drawFrame();
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto max_extend_text_size = 150;
|
||||
|
||||
bool SceneSequenceSwitch::pause = false;
|
||||
|
|
@ -793,3 +795,5 @@ void SequenceWidget::ReduceClicked()
|
|||
delete item;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
#include "switch-generic.hpp"
|
||||
#include "duration-control.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto round_trip_func = 1;
|
||||
|
||||
struct SceneSequenceSwitch : SceneSwitcherEntry {
|
||||
|
|
@ -82,3 +84,5 @@ protected:
|
|||
|
||||
SceneSequenceSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool TimeSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -306,3 +308,5 @@ void TimeSwitchWidget::TimeChanged(const QTime &time)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->time = time;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto time_func = 7;
|
||||
|
||||
typedef enum {
|
||||
|
|
@ -54,3 +56,5 @@ private:
|
|||
|
||||
TimeSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto default_def_transition_dealy = 300;
|
||||
bool DefaultSceneTransition::pause = false;
|
||||
unsigned int DefaultSceneTransition::delay = default_def_transition_dealy;
|
||||
|
|
@ -592,3 +594,5 @@ void DefaultSceneTransition::setTransition()
|
|||
t = std::thread(setTransitionDelayed, transition, delay);
|
||||
t.detach();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
struct SceneTransition : SceneSwitcherEntry {
|
||||
OBSWeakSource scene2 = nullptr;
|
||||
double duration = 0.3;
|
||||
|
|
@ -77,3 +79,5 @@ public:
|
|||
private:
|
||||
DefaultSceneTransition *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool VideoSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -577,3 +579,5 @@ void VideoSwitchWidget::IgnoreInactiveChanged(int state)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->ignoreInactiveSource = state;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -11,6 +11,8 @@
|
|||
#include "switch-generic.hpp"
|
||||
#include "screenshot-helper.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto video_func = 9;
|
||||
|
||||
enum class videoSwitchType {
|
||||
|
|
@ -80,3 +82,5 @@ private:
|
|||
|
||||
VideoSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
bool WindowSwitch::pause = false;
|
||||
static QMetaObject::Connection addPulse;
|
||||
|
||||
|
|
@ -482,3 +484,5 @@ void WindowSwitchWidget::FocusChanged(int state)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
switchData->focus = state;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#pragma once
|
||||
#include "switch-generic.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr auto window_title_func = 5;
|
||||
|
||||
struct WindowSwitch : SceneSwitcherEntry {
|
||||
|
|
@ -47,3 +49,5 @@ private:
|
|||
|
||||
WindowSwitch *switchData;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
#include <fstream>
|
||||
#include <sstream>
|
||||
|
||||
namespace advss {
|
||||
|
||||
static Display *xdisplay = 0;
|
||||
|
||||
static QLibrary *libXtstHandle = nullptr;
|
||||
|
|
@ -659,3 +661,5 @@ void PlatformCleanup()
|
|||
}
|
||||
cleanupDisplay();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
constexpr int64_t nsPerMs = 1000000;
|
||||
const std::string MacroActionAudio::id = "audio";
|
||||
|
||||
|
|
@ -622,3 +624,5 @@ void MacroActionAudioEdit::FadeTypeChanged(int value)
|
|||
_entryData->_fadeType = static_cast<MacroActionAudio::FadeType>(value);
|
||||
SetWidgetVisibility();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#include <QCheckBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionAudio : public MacroAction {
|
||||
public:
|
||||
MacroActionAudio(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -119,3 +121,5 @@ private:
|
|||
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "section.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
std::map<std::string, MacroActionInfo> &MacroActionFactory::GetMap()
|
||||
{
|
||||
static std::map<std::string, MacroActionInfo> _methods;
|
||||
|
|
@ -361,3 +363,5 @@ void AdvSceneSwitcher::MacroActionReorder(int to, int from)
|
|||
HighlightAction(to);
|
||||
emit(MacroSegmentOrderChanged());
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <QComboBox>
|
||||
#include <memory>
|
||||
|
||||
namespace advss {
|
||||
|
||||
struct MacroActionInfo {
|
||||
using TCreateMethod = std::shared_ptr<MacroAction> (*)(Macro *m);
|
||||
using TCreateWidgetMethod = QWidget *(*)(QWidget *parent,
|
||||
|
|
@ -51,3 +53,5 @@ private:
|
|||
std::shared_ptr<MacroAction> *_entryData;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <QTextStream>
|
||||
#include <QFileDialog>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionFile::id = "file";
|
||||
|
||||
bool MacroActionFile::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -167,3 +169,5 @@ void MacroActionFileEdit::ActionChanged(int value)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_action = static_cast<FileAction>(value);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <QSpinBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class FileAction {
|
||||
WRITE,
|
||||
APPEND,
|
||||
|
|
@ -65,3 +67,5 @@ protected:
|
|||
private:
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionFilter::id = "filter";
|
||||
|
||||
bool MacroActionFilter::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -247,3 +249,5 @@ void MacroActionFilterEdit::SetWidgetVisibility(bool showSettings)
|
|||
_getSettings->setVisible(showSettings);
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#include <QSpinBox>
|
||||
#include <QPushButton>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionFilter : public MacroAction {
|
||||
public:
|
||||
MacroActionFilter(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -79,3 +81,5 @@ private:
|
|||
void SetWidgetVisibility(bool);
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "utility.hpp"
|
||||
#include <obs-interaction.h>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionHotkey::id = "hotkey";
|
||||
|
||||
bool MacroActionHotkey::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -612,3 +614,5 @@ void MacroActionHotkeyEdit::KeyChanged(int key)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_key = static_cast<HotkeyType>(key);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <QSpinBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionHotkey : public MacroAction {
|
||||
public:
|
||||
MacroActionHotkey(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -93,3 +95,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "utility.hpp"
|
||||
#include "curl-helper.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionHttp::id = "http";
|
||||
|
||||
bool MacroActionHttp::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -292,3 +294,5 @@ void MacroActionHttpEdit::DataChanged()
|
|||
adjustSize();
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -9,6 +9,8 @@
|
|||
#include <QComboBox>
|
||||
#include <QCheckBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionHttp : public MacroAction {
|
||||
public:
|
||||
MacroActionHttp(Macro *m) : MacroAction(m, true) {}
|
||||
|
|
@ -85,3 +87,5 @@ private:
|
|||
DurationSelection *_timeout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionMacro::id = "macro";
|
||||
|
||||
bool MacroActionMacro::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -177,3 +179,5 @@ void MacroActionMacroEdit::ActionChanged(int value)
|
|||
_macros->ShowAllMacros();
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class PerformMacroAction {
|
||||
PAUSE,
|
||||
UNPAUSE,
|
||||
|
|
@ -64,3 +66,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionMedia::id = "media";
|
||||
|
||||
bool MacroActionMedia::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -187,3 +189,5 @@ void MacroActionMediaEdit::SetWidgetVisibility()
|
|||
_seek->setVisible(_entryData->_action == MediaAction::SEEK);
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <QSpinBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class MediaAction {
|
||||
PLAY,
|
||||
PAUSE,
|
||||
|
|
@ -74,3 +76,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <thread>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionPluginState::id = "plugin_state";
|
||||
|
||||
bool MacroActionPluginState::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -263,3 +265,5 @@ void MacroActionPluginStateEdit::SetWidgetVisibility()
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <QDoubleSpinBox>
|
||||
#include <QLabel>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class PluginStateAction {
|
||||
STOP,
|
||||
NO_MATCH_BEHAVIOUR,
|
||||
|
|
@ -69,3 +71,5 @@ private:
|
|||
void SetWidgetVisibility();
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionProfile::id = "profile";
|
||||
|
||||
bool MacroActionProfile::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -81,3 +83,5 @@ void MacroActionProfileEdit::ProfileChanged(const QString &text)
|
|||
emit HeaderInfoChanged(
|
||||
QString::fromStdString(_entryData->GetShortDesc()));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <QComboBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionProfile : public MacroAction {
|
||||
public:
|
||||
MacroActionProfile(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -52,3 +54,5 @@ protected:
|
|||
private:
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <QScreen>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionProjector::id = "projector";
|
||||
|
||||
bool MacroActionProjector::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -288,3 +290,5 @@ void MacroActionProjectorEdit::SetWidgetVisibility()
|
|||
adjustSize();
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
#include "scene-selection.hpp"
|
||||
#include "source-selection.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionProjector : public MacroAction {
|
||||
public:
|
||||
MacroActionProjector(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -71,3 +73,5 @@ private:
|
|||
void SetWidgetVisibility();
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <cstdlib>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionRandom::id = "random";
|
||||
|
||||
bool MacroActionRandom::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -203,3 +205,5 @@ bool MacroActionRandomEdit::ShouldShowAllowRepeat()
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <QListWidget>
|
||||
#include <QCheckBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionRandom : public MultiMacroRefAction {
|
||||
public:
|
||||
MacroActionRandom(Macro *m) : MacroAction(m), MultiMacroRefAction(m) {}
|
||||
|
|
@ -60,3 +62,5 @@ private:
|
|||
QCheckBox *_allowRepeat;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionRecord::id = "recording";
|
||||
|
||||
bool MacroActionRecord::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -145,3 +147,5 @@ void MacroActionRecordEdit::ActionChanged(int value)
|
|||
_entryData->_action = static_cast<RecordAction>(value);
|
||||
SetLabelVisibility();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <QComboBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class RecordAction {
|
||||
STOP,
|
||||
START,
|
||||
|
|
@ -63,3 +65,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionReplayBuffer::id = "replay_buffer";
|
||||
|
||||
bool MacroActionReplayBuffer::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -123,3 +125,5 @@ void MacroActionReplayBufferEdit::ActionChanged(int value)
|
|||
ReplayBufferAction::SAVE);
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class ReplayBufferAction {
|
||||
STOP,
|
||||
START,
|
||||
|
|
@ -58,3 +60,5 @@ protected:
|
|||
private:
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
#include <QProcess>
|
||||
#include <QDesktopServices>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionRun::id = "run";
|
||||
|
||||
bool MacroActionRun::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -87,3 +89,5 @@ void MacroActionRunEdit::ProcessConfigChanged(const ProcessConfig &conf)
|
|||
emit HeaderInfoChanged(
|
||||
QString::fromStdString(_entryData->GetShortDesc()));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "macro-action-edit.hpp"
|
||||
#include "process-config.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionRun : public MacroAction {
|
||||
public:
|
||||
MacroActionRun(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -50,3 +52,5 @@ private:
|
|||
ProcessConfigEdit *_procConfig;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSceneCollection::id = "scene_collection";
|
||||
|
||||
bool MacroActionSceneCollection::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -115,3 +117,5 @@ void MacroActionSceneCollectionEdit::SceneCollectionChanged(const QString &text)
|
|||
emit HeaderInfoChanged(
|
||||
QString::fromStdString(_entryData->GetShortDesc()));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <QComboBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionSceneCollection : public MacroAction {
|
||||
public:
|
||||
MacroActionSceneCollection(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -53,3 +55,5 @@ protected:
|
|||
private:
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSceneOrder::id = "scene_order";
|
||||
|
||||
bool MacroActionSceneOrder::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -250,3 +252,5 @@ void MacroActionSceneOrderEdit::PositionChanged(int value)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_position = value;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <QSpinBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class SceneOrderAction {
|
||||
MOVE_UP,
|
||||
MOVE_DOWN,
|
||||
|
|
@ -73,3 +75,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
using namespace std::chrono_literals;
|
||||
|
||||
const std::string MacroActionSwitchScene::id = "scene_switch";
|
||||
|
|
@ -298,3 +300,5 @@ void MacroActionSwitchSceneEdit::TransitionChanged(const TransitionSelection &t)
|
|||
_entryData->_transition = t;
|
||||
SetDurationVisibility();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <QCheckBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionSwitchScene : public MacroAction {
|
||||
public:
|
||||
MacroActionSwitchScene(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -69,3 +71,5 @@ private:
|
|||
void SetDurationVisibility();
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSceneTransform::id = "scene_transform";
|
||||
|
||||
bool MacroActionSceneTransform::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -227,3 +229,5 @@ void MacroActionSceneTransformEdit::SettingsChanged()
|
|||
adjustSize();
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
|
||||
#include <QSpinBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionSceneTransform : public MacroAction {
|
||||
public:
|
||||
MacroActionSceneTransform(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -70,3 +72,5 @@ protected:
|
|||
private:
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSceneVisibility::id = "scene_visibility";
|
||||
|
||||
bool MacroActionSceneVisibility::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -311,3 +313,5 @@ void MacroActionSceneVisibilityEdit::SetWidgetVisibility()
|
|||
SceneItemSourceType::SOURCE_GROUP);
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <QSpinBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class SceneVisibilityAction {
|
||||
SHOW,
|
||||
HIDE,
|
||||
|
|
@ -81,3 +83,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const uint32_t MacroActionScreenshot::_version = 1;
|
||||
|
||||
const std::string MacroActionScreenshot::id = "screenshot";
|
||||
|
|
@ -272,3 +274,5 @@ void MacroActionScreenshotEdit::SetWidgetVisibility()
|
|||
|
||||
adjustSize();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
#include <QComboBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionScreenshot : public MacroAction {
|
||||
public:
|
||||
MacroActionScreenshot(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -84,3 +86,5 @@ private:
|
|||
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSequence::id = "sequence";
|
||||
|
||||
bool MacroActionSequence::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -264,3 +266,5 @@ void MacroActionSequenceEdit::UpdateStatusLine()
|
|||
obs_module_text("AdvSceneSwitcher.action.sequence.status")};
|
||||
_statusLine->setText(format.arg(lastMacroName, nextMacroName));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -7,6 +7,8 @@
|
|||
#include <QCheckBox>
|
||||
#include <QTimer>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionSequence : public MultiMacroRefAction {
|
||||
public:
|
||||
MacroActionSequence(Macro *m) : MacroAction(m), MultiMacroRefAction(m)
|
||||
|
|
@ -70,3 +72,5 @@ private:
|
|||
QTimer _statusTimer;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,7 +2,9 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
Q_DECLARE_METATYPE(SourceSettingButton);
|
||||
Q_DECLARE_METATYPE(advss::SourceSettingButton);
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSource::id = "source";
|
||||
|
||||
|
|
@ -343,3 +345,5 @@ std::string SourceSettingButton::ToString() const
|
|||
}
|
||||
return "[" + id + "] " + description;
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <QPushButton>
|
||||
#include <QComboBox>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class SourceAction {
|
||||
ENABLE,
|
||||
DISABLE,
|
||||
|
|
@ -87,3 +89,5 @@ private:
|
|||
void SetWidgetVisibility();
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionStream::id = "streaming";
|
||||
|
||||
bool MacroActionStream::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -120,3 +122,5 @@ void MacroActionStreamEdit::ActionChanged(int value)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_action = static_cast<StreamAction>(value);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <QHBoxLayout>
|
||||
#include <chrono>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class StreamAction {
|
||||
STOP,
|
||||
START,
|
||||
|
|
@ -61,3 +63,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSudioMode::id = "studio_mode";
|
||||
|
||||
bool MacroActionSudioMode::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -167,3 +169,5 @@ void MacroActionSudioModeEdit::ActionChanged(int value)
|
|||
emit HeaderInfoChanged(
|
||||
QString::fromStdString(_entryData->GetShortDesc()));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "macro-action-edit.hpp"
|
||||
#include "scene-selection.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class StudioModeAction {
|
||||
SWAP_SCENE,
|
||||
SET_SCENE,
|
||||
|
|
@ -61,3 +63,5 @@ protected:
|
|||
private:
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionSystray::id = "systray_notification";
|
||||
|
||||
bool MacroActionSystray::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -68,3 +70,5 @@ void MacroActionSystrayEdit::MessageChanged()
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_msg = _msg->text().toStdString();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
#include <QLineEdit>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionSystray : public MacroAction {
|
||||
public:
|
||||
MacroActionSystray(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -48,3 +50,5 @@ private:
|
|||
QLineEdit *_msg;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include <random>
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionTimer::id = "timer";
|
||||
|
||||
bool MacroActionTimer::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -204,3 +206,5 @@ void MacroActionTimerEdit::MacroChanged(const QString &text)
|
|||
emit HeaderInfoChanged(
|
||||
QString::fromStdString(_entryData->GetShortDesc()));
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#include <QDoubleSpinBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class TimerAction {
|
||||
PAUSE,
|
||||
CONTINUE,
|
||||
|
|
@ -69,3 +71,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionTransition::id = "transition";
|
||||
|
||||
bool MacroActionTransition::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -382,3 +384,5 @@ void MacroActionTransitionEdit::SetDurationChanged(int state)
|
|||
_entryData->_setDuration = state;
|
||||
_duration->setEnabled(state);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <QCheckBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionTransition : public MacroAction {
|
||||
public:
|
||||
MacroActionTransition(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -91,3 +93,5 @@ private:
|
|||
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "math-helpers.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionVariable::id = "variable";
|
||||
|
||||
bool MacroActionVariable::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -833,3 +835,5 @@ void MacroActionVariableEdit::SetWidgetVisibility()
|
|||
adjustSize();
|
||||
updateGeometry();
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include "resizing-text-edit.hpp"
|
||||
#include "variable-line-edit.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
class MacroActionVariable : public MacroAction {
|
||||
public:
|
||||
MacroActionVariable(Macro *m) : MacroAction(m) {}
|
||||
|
|
@ -134,3 +136,5 @@ private:
|
|||
QTimer _timer;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -2,6 +2,8 @@
|
|||
#include "advanced-scene-switcher.hpp"
|
||||
#include "utility.hpp"
|
||||
|
||||
namespace advss {
|
||||
|
||||
const std::string MacroActionVCam::id = "virtual_cam";
|
||||
|
||||
bool MacroActionVCam::_registered = MacroActionFactory::Register(
|
||||
|
|
@ -109,3 +111,5 @@ void MacroActionVCamEdit::ActionChanged(int value)
|
|||
std::lock_guard<std::mutex> lock(switcher->m);
|
||||
_entryData->_action = static_cast<VCamAction>(value);
|
||||
}
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
|
|
@ -4,6 +4,8 @@
|
|||
#include <QComboBox>
|
||||
#include <QHBoxLayout>
|
||||
|
||||
namespace advss {
|
||||
|
||||
enum class VCamAction {
|
||||
STOP,
|
||||
START,
|
||||
|
|
@ -56,3 +58,5 @@ private:
|
|||
QHBoxLayout *_mainLayout;
|
||||
bool _loading = true;
|
||||
};
|
||||
|
||||
} // namespace advss
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user