summaryrefslogtreecommitdiffstats
path: root/commands/command_divesite.h
diff options
context:
space:
mode:
Diffstat (limited to 'commands/command_divesite.h')
-rw-r--r--commands/command_divesite.h26
1 files changed, 25 insertions, 1 deletions
diff --git a/commands/command_divesite.h b/commands/command_divesite.h
index 3fcf085ae..db0c5c73e 100644
--- a/commands/command_divesite.h
+++ b/commands/command_divesite.h
@@ -5,6 +5,7 @@
#define COMMAND_DIVESITE_H
#include "command_base.h"
+#include "core/gpslocation.h"
#include <QVector>
@@ -110,7 +111,6 @@ private:
QString value; // Value to be set
};
-
class EditDiveSiteCountry : public Base {
public:
EditDiveSiteCountry(dive_site *ds, const QString &country);
@@ -165,6 +165,30 @@ private:
std::vector<OwningDiveSitePtr> sitesToAdd;
};
+class ApplyGPSFixes : public Base {
+public:
+ // Note: the dive site table is consumed after the call it will be empty.
+ ApplyGPSFixes(const std::vector<DiveAndLocation> &fixes);
+private:
+ bool workToBeDone() override;
+ void undo() override;
+ void redo() override;
+
+ // For undo
+ std::vector<dive_site *> sitesToRemove;
+
+ // For redo
+ std::vector<OwningDiveSitePtr> sitesToAdd;
+
+ // For redo and undo
+ struct SiteAndLocation {
+ dive_site *ds;
+ location_t location;
+ };
+ std::vector<SiteAndLocation> siteLocations;
+ void editDiveSites();
+};
+
} // namespace Command
#endif // COMMAND_DIVESITE_H