Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
plugin_operator.h
1// SPDX-FileCopyrightText: © 2026 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include "plugins/plugin_all.h"
7#include "structure/tracks/track_all.h"
8#include "undo/undo_stack.h"
9
10#include <QtQmlIntegration/qqmlintegration.h>
11
12namespace zrythm::actions
13{
14
15class PluginOperator : public QObject
16{
17 Q_OBJECT
18 QML_ELEMENT
19 QML_UNCREATABLE ("Needs plugin registry")
20
21public:
22 explicit PluginOperator (
23 undo::UndoStack &undo_stack,
24 plugins::PluginRegistry &plugin_registry,
25 QObject * parent = nullptr)
26 : QObject (parent), plugin_registry_ (plugin_registry),
27 undo_stack_ (undo_stack)
28 {
29 }
30
42 Q_INVOKABLE void movePlugins (
43 QList<plugins::Plugin *> plugins,
44 plugins::PluginGroup * source_group,
45 structure::tracks::Track * source_track,
46 plugins::PluginGroup * target_group,
47 structure::tracks::Track * target_track,
48 int target_start_index = -1);
49
57 Q_INVOKABLE void removePlugins (
58 QList<plugins::Plugin *> plugins,
61
62private:
63 plugins::PluginRegistry &plugin_registry_;
64 undo::UndoStack &undo_stack_;
65};
66
67} // namespace zrythm::actions
Q_INVOKABLE void removePlugins(QList< plugins::Plugin * > plugins, plugins::PluginGroup *group, structure::tracks::Track *track)
Removes one or more plugins from their PluginGroup.
Q_INVOKABLE void movePlugins(QList< plugins::Plugin * > plugins, plugins::PluginGroup *source_group, structure::tracks::Track *source_track, plugins::PluginGroup *target_group, structure::tracks::Track *target_track, int target_start_index=-1)
Moves one or more plugins between PluginGroups.
A flexible container for plugins and nested plugin groups.
Represents a track in the project.
Definition track.h:54