mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-03-26 20:05:25 -05:00
If there are else actions to run holding control and clicking the "Run macros" button will allow you to test them.
30 lines
520 B
C++
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
|