SceneSwitcher/src/utils/macro-run-button.hpp
WarmUpTill d6e4ee0203 Add option to run "else" actions using the "Run macros" button
If there are else actions to run holding control and clicking the "Run
macros" button will allow you to test them.
2023-09-13 19:49:55 +02:00

30 lines
520 B
C++

#pragma once
#include <QPushButton>
#include <QTimer>
namespace advss {
class MacroTree;
class MacroRunButton : public QPushButton {
Q_OBJECT
public:
MacroRunButton(QWidget *parent = nullptr);
void SetMacroTree(MacroTree *);
protected:
bool eventFilter(QObject *obj, QEvent *event) override;
private slots:
void MacroSelectionChanged();
void Pressed();
private:
MacroTree *_macros = nullptr;
bool _macroHasElseActions = false;
bool _runElseActionsKeyHeld = false;
QTimer _timer;
};
} // namespace advss