Debian Codegraph @

BambooTracker/command/order/paste_copied_data_to_order_command.hpp

raw
1 /*
2 * SPDX-FileCopyrightText: 2018 Rerrah
3 * SPDX-License-Identifier: MIT
4 */
5
6 #pragma once
7
8 #include <memory>
9 #include <string>
10 #include "../abstract_command.hpp"
11 #include "module.hpp"
12 #include "vector_2d.hpp"
13
14 class PasteCopiedDataToOrderCommand final : public AbstractCommand
15 {
16 public:
17 PasteCopiedDataToOrderCommand(
18 std::weak_ptr<Module> mod, int songNum, int beginTrack, int beginOrder,
19 const Vector2d<int>& cells);
20 bool redo() override;
21 bool undo() override;
22
23 private:
24 std::weak_ptr<Module> mod_;
25 int song_, track_, order_;
26 Vector2d<int> cells_, prevCells_;
27
28 void setCells(const Vector2d<int>& cells);
29 };