Add option to wait for transition to complete

This commit is contained in:
WarmUpTill
2021-12-22 22:12:01 +01:00
committed by WarmUpTill
parent 0881146a25
commit a2ba7adc56
5 changed files with 67 additions and 2 deletions

View File

@@ -3,6 +3,8 @@
#include "switch-generic.hpp"
#include "duration-control.hpp"
#include <QCheckBox>
// TODO: Switch to using SceneSelection class and widget instead
class MacroActionSwitchScene : public MacroAction, public SceneSwitcherEntry {
@@ -19,6 +21,7 @@ public:
return std::make_shared<MacroActionSwitchScene>();
}
Duration _duration;
bool _blockUntilTransitionDone = true;
private:
const char *getType() { return "MacroActionSwitchScene"; }
@@ -45,11 +48,13 @@ public:
private slots:
void DurationChanged(double seconds);
void BlockUntilTransitionDoneChanged(int state);
void ChangeHeaderInfo(const QString &);
signals:
void HeaderInfoChanged(const QString &);
protected:
DurationSelection *_duration;
QCheckBox *_blockUntilTransitionDone;
std::shared_ptr<MacroActionSwitchScene> _entryData;
};

View File

@@ -117,6 +117,7 @@ struct SwitcherData {
std::deque<std::shared_ptr<Macro>> macros;
std::condition_variable macroWaitCv;
std::atomic_bool abortMacroWait = {false};
std::condition_variable macroTransitionCv;
bool macroSceneSwitched = false;
bool replayBufferSaved = false;