22class MixerSelectionsAction :
public QObject,
public UndoableAction
26 DEFINE_UNDOABLE_ACTION_QML_PROPERTIES (MixerSelectionsAction)
46 using PluginSlotType = plugins::PluginSlotType;
48 using PluginUuid = Plugin::Uuid;
49 using PluginPtrVariant = plugins::PluginPtrVariant;
65 std::optional<PluginSpan> ms,
68 std::optional<Track::Uuid> to_track_id,
69 std::optional<plugins::PluginSlot> to_slot,
70 const PluginConfiguration * setting,
73 zrythm::plugins::BridgeMode new_bridge_mode,
74 QObject * parent =
nullptr);
78 void get_plugins (std::vector<Plugin *> &plugins)
override
83 PluginSpan{ *
ms_before_ }.get_plugins (plugins);
89 friend void init_from (
90 MixerSelectionsAction &obj,
91 const MixerSelectionsAction &other,
95 void init_loaded_impl ()
override;
96 void perform_impl ()
override;
97 void undo_impl ()
override;
105 void clone_ats (PluginSpan plugins,
bool deleted,
int start_slot);
107 void copy_at_regions (AutomationTrack &dest,
const AutomationTrack &src);
115 void revert_automation (
117 plugins::PluginSlot slot,
126 void save_existing_plugin (
127 std::vector<PluginPtrVariant> tmp_plugins,
129 plugins::PluginSlot from_slot,
131 plugins::PluginSlot to_slot);
133 void revert_deleted_plugin (Track &to_tr, plugins::PluginSlot to_slot);
135 void do_or_undo_create_or_delete (
bool do_it,
bool create);
136 void do_or_undo_change_status (
bool do_it);
137 void do_or_undo_change_load_behavior (
bool do_it);
138 void do_or_undo_move_or_copy (
bool do_it,
bool copy);
139 void do_or_undo (
bool do_it);
142 Type mixer_selections_action_type_ =
Type ();
167 zrythm::plugins::BridgeMode::None;
179 std::optional<std::vector<PluginUuid>> ms_before_simple_;
202 std::vector<std::unique_ptr<AutomationTrack>>
ats_;
205class MixerSelectionsCreateAction :
public MixerSelectionsAction
208 MixerSelectionsCreateAction (
209 const Track &to_track,
210 plugins::PluginSlot to_slot,
211 const PluginConfiguration &setting,
213 : MixerSelectionsAction (
217 to_track.get_uuid (),
222 zrythm::plugins::BridgeMode::None)
227class MixerSelectionsTargetedAction :
public MixerSelectionsAction
230 MixerSelectionsTargetedAction (
234 const Track * to_track,
235 plugins::PluginSlot to_slot)
236 : MixerSelectionsAction (
240 (to_track !=
nullptr)
241 ? std::make_optional (to_track->get_uuid ())
247 zrythm::plugins::BridgeMode::None)
288class MixerSelectionsMoveAction :
public MixerSelectionsTargetedAction
291 MixerSelectionsMoveAction (
294 const Track * to_track,
295 plugins::PluginSlot to_slot)
296 : MixerSelectionsTargetedAction (
299 MixerSelectionsAction::Type::Move,
306class MixerSelectionsDeleteAction :
public MixerSelectionsAction
309 MixerSelectionsDeleteAction (
312 : MixerSelectionsAction (
315 MixerSelectionsAction::Type::Delete,
321 zrythm::plugins::BridgeMode::None)
326class MixerSelectionsChangeStatusAction :
public MixerSelectionsAction
329 MixerSelectionsChangeStatusAction (PluginSpan plugins,
int new_val)
330 : MixerSelectionsAction (
333 MixerSelectionsAction::Type::ChangeStatus,
339 zrythm::plugins::BridgeMode::None)
344class MixerSelectionsChangeLoadBehaviorAction :
public MixerSelectionsAction
347 MixerSelectionsChangeLoadBehaviorAction (
349 zrythm::plugins::BridgeMode new_bridge_mode)
350 : MixerSelectionsAction (
353 MixerSelectionsAction::Type::ChangeLoadBehavior,
MixerSelectionsAction(std::optional< PluginSpan > ms, const dsp::PortConnectionsManager *connections_mgr, Type type, std::optional< Track::Uuid > to_track_id, std::optional< plugins::PluginSlot > to_slot, const PluginConfiguration *setting, int num_plugins, int new_val, zrythm::plugins::BridgeMode new_bridge_mode, QObject *parent=nullptr)
Create a new action.