Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
remove_plugins_command.h
1// SPDX-FileCopyrightText: © 2026 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#include "utils/qt.h"
11
12#include <QUndoCommand>
13
14namespace zrythm::commands
15{
16
23class RemovePluginsCommand : public QUndoCommand
24{
25public:
26 static constexpr int CommandId = 1775263310;
27
40
46 explicit RemovePluginsCommand (std::vector<PluginRemoveInfo> plugin_infos);
47
48 void undo () override;
49 void redo () override;
50
51 int id () const override { return CommandId; }
52
53private:
54 void remove_plugin_automation (
55 const plugins::PluginUuidReference &plugin_ref,
57
58 std::vector<PluginRemoveInfo> plugin_infos_;
59
61 struct RemovedAutomation
62 {
64 std::vector<utils::QObjectUniquePtr<structure::tracks::AutomationTrackHolder>>
65 tracks;
66 };
67 std::vector<RemovedAutomation> removed_automation_;
68};
69
70} // namespace zrythm::commands
RemovePluginsCommand(std::vector< PluginRemoveInfo > plugin_infos)
Constructs a command to remove plugins.
A flexible container for plugins and nested plugin groups.
A container that manages a list of automation tracks.
plugins::PluginUuidReference plugin_ref
Reference to the plugin being removed.
plugins::PluginGroup * source_group
Group the plugin belongs to.
int index_in_source
Index of the plugin in its group (saved during redo).
structure::tracks::AutomationTracklist * source_atl
Automation tracklist for the owning track (may be null).