aboutsummaryrefslogtreecommitdiffstats
path: root/commands/command_pictures.h
diff options
context:
space:
mode:
Diffstat (limited to 'commands/command_pictures.h')
-rw-r--r--commands/command_pictures.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/commands/command_pictures.h b/commands/command_pictures.h
new file mode 100644
index 000000000..f2381d111
--- /dev/null
+++ b/commands/command_pictures.h
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: GPL-2.0
+// Note: this header file is used by the undo-machinery and should not be included elsewhere.
+
+#ifndef COMMAND_PICTURES_H
+#define COMMAND_PICTURES_H
+
+#include "command_base.h"
+
+// We put everything in a namespace, so that we can shorten names without polluting the global namespace
+namespace Command {
+
+class SetPictureOffset final : public Base {
+public:
+ SetPictureOffset(dive *d, const QString &filename, offset_t offset); // Pictures are identified by the unique (dive,filename) pair
+private:
+ dive *d; // null means no work to be done
+ QString filename;
+ offset_t offset;
+
+ void undo() override;
+ void redo() override;
+ bool workToBeDone() override;
+};
+
+} // namespace Command
+#endif