blob: f057c8e5b8b3764e5f58d6a1d160ba6673769224 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
// Copyright (C) 2016 Nicolas Arnaud-Cormos
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0+ OR GPL-3.0 WITH Qt-GPL-exception-1.0
#pragma once
#include <QObject>
namespace Macros {
namespace Internal {
class Macro;
class MacroEvent;
class MacroManager;
class IMacroHandler: public QObject
{
Q_OBJECT
public:
virtual void startRecording(Macro* macro);
virtual void endRecordingMacro(Macro* macro);
virtual bool canExecuteEvent(const MacroEvent ¯oEvent) = 0;
virtual bool executeEvent(const MacroEvent ¯oEvent) = 0;
protected:
void addMacroEvent(const MacroEvent& event);
void setCurrentMacro(Macro *macro);
bool isRecording() const;
private:
friend class MacroManager;
Macro *m_currentMacro = nullptr;
};
} // namespace Internal
} // namespace Macros
|