Move hightlight and update of paused state into MacroListEntryWidget

This commit is contained in:
WarmUpTill
2022-03-06 19:08:21 +01:00
committed by WarmUpTill
parent 37734445e7
commit 001d8b4714
5 changed files with 51 additions and 37 deletions

View File

@@ -92,6 +92,7 @@ signals:
void MacroAdded(const QString &name);
void MacroRemoved(const QString &name);
void MacroRenamed(const QString &oldName, const QString newName);
void HighlightMacrosChanged(bool value);
void SceneGroupAdded(const QString &name);
void SceneGroupRemoved(const QString &name);
void SceneGroupRenamed(const QString &oldName, const QString newName);
@@ -158,7 +159,6 @@ public slots:
void ResetOpacityActionControls();
void ResetOpacityConditionControls();
void HighlightControls();
void HighlightMatchedMacros();
void MacroDragDropReorder(QModelIndex, int, int, QModelIndex, int);
void on_screenRegionSwitches_currentRowChanged(int idx);

View File

@@ -2,6 +2,7 @@
#include <QLabel>
#include <QCheckBox>
#include <QTimer>
#include <memory>
class Macro;
@@ -10,15 +11,22 @@ class MacroListEntryWidget : public QWidget {
Q_OBJECT
public:
MacroListEntryWidget(std::shared_ptr<Macro>, QWidget *parent);
MacroListEntryWidget(std::shared_ptr<Macro>, bool highlight,
QWidget *parent);
void SetName(const QString &);
void SetMacro(std::shared_ptr<Macro> &);
private slots:
void PauseChanged(int);
void HighlightExecuted();
void UpdatePaused();
void EnableHighlight(bool);
private:
QTimer _timer;
QLabel *_name;
QCheckBox *_running;
std::shared_ptr<Macro> _macro;
bool _highlightExecutedMacros = false;
};