Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
move_plugin_command.h
1// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include <utility>
7
8#include "plugins/plugin_group.h"
9#include "structure/tracks/automation_tracklist.h"
10
11#include <QPointer>
12#include <QUndoCommand>
13
14namespace zrythm::commands
15{
16class MovePluginCommand : public QUndoCommand
17{
18public:
19 using PluginLocation =
20 std::pair<plugins::PluginGroup *, structure::tracks::AutomationTracklist *>;
21
22 MovePluginCommand (
23 plugins::PluginUuidReference plugin_ref,
24 PluginLocation source_locaction,
25 PluginLocation target_locaction,
26 std::optional<int> index = std::nullopt);
27
28 void undo () override;
29 void redo () override;
30
31private:
32 void move_plugin_automation (
35
36private:
37 plugins::PluginUuidReference plugin_ref_;
38 PluginLocation target_location_;
39 PluginLocation source_location_;
40 int index_in_previous_list_{};
41 std::optional<int> index_;
42};
43
44} // namespace zrythm::commands
A container that manages a list of automation tracks.