+ награды за баллы

- создание
- изменение
- удаление
- отображение
This commit is contained in:
2026-02-15 11:26:19 +03:00
parent 63b7fa4ea1
commit ae4121157d
8 changed files with 608 additions and 19 deletions
+35
View File
@@ -0,0 +1,35 @@
// action.h
#ifndef ACTION_H
#define ACTION_H
#include <QString>
#include <QVariantMap>
class Action {
public:
enum Type { KeyPress, Sound, Notification, File };
virtual ~Action() = default;
virtual Type type() const = 0;
virtual void execute() = 0;
virtual QVariantMap toJson() const = 0;
virtual void fromJson(const QVariantMap &data) = 0;
};
// Конкретные действия
class KeyPressAction : public Action {
public:
Type type() const override { return KeyPress; }
void execute() override;
QVariantMap toJson() const override;
void fromJson(const QVariantMap &data) override;
private:
int keyCode;
Qt::KeyboardModifiers modifiers;
};
class SoundAction : public Action {
// ...
};
// ... и т.д.
#endif // ACTION_H