summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/command_divesite.h
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/command_divesite.h')
-rw-r--r--desktop-widgets/command_divesite.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop-widgets/command_divesite.h b/desktop-widgets/command_divesite.h
index 78622862e..f436a84b4 100644
--- a/desktop-widgets/command_divesite.h
+++ b/desktop-widgets/command_divesite.h
@@ -11,6 +11,23 @@
// We put everything in a namespace, so that we can shorten names without polluting the global namespace
namespace Command {
+class AddDiveSite : public Base {
+public:
+ AddDiveSite(const QString &name);
+private:
+ bool workToBeDone() override;
+ void undo() override;
+ void redo() override;
+
+ // Note: we only add one dive site. Nevertheless, we use vectors so that we
+ // can reuse the dive site deletion code.
+ // For redo
+ std::vector<dive_site *> sitesToRemove;
+
+ // For undo
+ std::vector<OwningDiveSitePtr> sitesToAdd;
+};
+
class DeleteDiveSites : public Base {
public:
DeleteDiveSites(const QVector<dive_site *> &sites);