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.
49 lines
1.2 KiB
C++
49 lines
1.2 KiB
C++
/******************************************************************************
|
|
Note: Long-term goal is to remove this tab / file.
|
|
Most functionality shall be moved to the Macro tab instead.
|
|
|
|
So if you plan to make changes here, please consider applying them to the
|
|
corresponding macro tab functionality instead.
|
|
******************************************************************************/
|
|
#pragma once
|
|
#include <QCheckBox>
|
|
#include "switch-generic.hpp"
|
|
|
|
namespace advss {
|
|
|
|
constexpr auto exe_func = 3;
|
|
|
|
struct ExecutableSwitch : SceneSwitcherEntry {
|
|
static bool pause;
|
|
QString exe = "";
|
|
bool inFocus = false;
|
|
|
|
const char *getType() { return "exec"; }
|
|
void save(obs_data_t *obj);
|
|
void load(obs_data_t *obj);
|
|
};
|
|
|
|
class ExecutableSwitchWidget : public SwitchWidget {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
ExecutableSwitchWidget(QWidget *parent, 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;
|
|
|
|
ExecutableSwitch *switchData;
|
|
};
|
|
|
|
} // namespace advss
|