diff options
Diffstat (limited to 'desktop-widgets/command_divesite.h')
-rw-r--r-- | desktop-widgets/command_divesite.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/desktop-widgets/command_divesite.h b/desktop-widgets/command_divesite.h index 9661bbffd..3fcf085ae 100644 --- a/desktop-widgets/command_divesite.h +++ b/desktop-widgets/command_divesite.h @@ -21,10 +21,26 @@ private: // Note: we only add one dive site. Nevertheless, we use vectors so that we // can reuse the dive site deletion code. - // For redo + // For undo std::vector<dive_site *> sitesToRemove; + // For redo + std::vector<OwningDiveSitePtr> sitesToAdd; +}; + +class ImportDiveSites : public Base { +public: + // Note: the dive site table is consumed after the call it will be empty. + ImportDiveSites(struct dive_site_table *sites, const QString &source); +private: + bool workToBeDone() override; + void undo() override; + void redo() override; + // For undo + std::vector<dive_site *> sitesToRemove; + + // For redo std::vector<OwningDiveSitePtr> sitesToAdd; }; |