diff options
Diffstat (limited to 'commands/command_event.h')
-rw-r--r-- | commands/command_event.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/commands/command_event.h b/commands/command_event.h index b9662ecd4..fbf48c425 100644 --- a/commands/command_event.h +++ b/commands/command_event.h @@ -5,6 +5,7 @@ #define COMMAND_EVENT_H #include "command_base.h" +#include "core/divemode.h" // We put everything in a namespace, so that we can shorten names without polluting the global namespace namespace Command { @@ -35,10 +36,11 @@ private: class AddEventBase : public EventBase { public: AddEventBase(struct dive *d, int dcNr, struct event *ev); // Takes ownership of event! -private: - bool workToBeDone() override; +protected: void undoit() override; void redoit() override; +private: + bool workToBeDone() override; OwningEventPtr eventToAdd; // for redo event *eventToRemove; // for undo @@ -57,6 +59,10 @@ public: class AddEventSetpointChange : public AddEventBase { public: AddEventSetpointChange(struct dive *d, int dcNr, int seconds, pressure_t pO2); +private: + divemode_t divemode; // Wonderful: this may change the divemode of the dive to CCR + void undoit() override; + void redoit() override; }; class RenameEvent : public EventBase { |