2021-11-14 18:30:58 +01:00
|
|
|
#pragma once
|
|
|
|
#include <json.hpp>
|
|
|
|
#include <memory>
|
2023-02-25 18:12:34 +01:00
|
|
|
#include <utils/flog.h>
|
2021-11-14 18:30:58 +01:00
|
|
|
|
|
|
|
using namespace nlohmann;
|
|
|
|
|
|
|
|
namespace sched_action {
|
|
|
|
class ActionClass {
|
|
|
|
public:
|
2021-12-19 22:11:44 +01:00
|
|
|
virtual ~ActionClass(){};
|
2021-11-14 18:30:58 +01:00
|
|
|
virtual void trigger() = 0;
|
|
|
|
virtual void prepareEditMenu() = 0;
|
2021-11-15 17:15:59 +01:00
|
|
|
virtual bool showEditMenu(bool& valid) = 0;
|
2021-11-14 18:30:58 +01:00
|
|
|
virtual void loadFromConfig(json config) = 0;
|
|
|
|
virtual json saveToConfig() = 0;
|
|
|
|
virtual std::string getName() = 0;
|
2021-11-15 17:15:59 +01:00
|
|
|
|
|
|
|
virtual bool isValid() {
|
|
|
|
return valid;
|
|
|
|
}
|
|
|
|
|
|
|
|
bool selected = false;
|
2021-12-19 22:11:44 +01:00
|
|
|
|
2021-11-15 17:15:59 +01:00
|
|
|
private:
|
|
|
|
bool valid = false;
|
2021-11-14 18:30:58 +01:00
|
|
|
};
|
|
|
|
|
2021-12-19 22:11:44 +01:00
|
|
|
typedef std::shared_ptr<ActionClass> Action;
|
2021-11-14 18:30:58 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
#include <actions/start_recorder.h>
|
|
|
|
#include <actions/tune_vfo.h>
|