SceneSwitcher/lib/legacy/switch-idle.hpp
WarmUpTill 7d0332dd0e Restructure library and plugins
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.
2024-01-27 14:10:34 +01:00

43 lines
1.0 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 "switch-generic.hpp"
namespace advss {
constexpr auto default_idle_time = 60;
constexpr auto idle_func = 2;
struct IdleData : SceneSwitcherEntry {
static bool pause;
bool idleEnable = false;
int time = default_idle_time;
bool alreadySwitched = false;
const char *getType() { return "idle"; }
void save(obs_data_t *obj);
void load(obs_data_t *obj);
};
class IdleWidget : public SwitchWidget {
Q_OBJECT
public:
IdleWidget(QWidget *parent, IdleData *s);
private slots:
void DurationChanged(int dur);
private:
QSpinBox *duration;
IdleData *switchData;
};
} // namespace advss