Files
SceneSwitcher/src/legacy/switch-executable.hpp
WarmUpTill 53a5fa6ff4 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.
2022-08-17 11:08:53 -07:00

45 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"
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;
};