16class ChannelSendAction :
public QObject,
public UndoableAction
20 DEFINE_UNDOABLE_ACTION_QML_PROPERTIES (ChannelSendAction)
35 using PortType = zrythm::dsp::PortType;
38 ChannelSendAction (QObject * parent =
nullptr);
50 const ChannelSend &send,
52 std::optional<std::pair<const dsp::AudioPort &, const dsp::AudioPort &>>
59 friend void init_from (
60 ChannelSendAction &obj,
61 const ChannelSendAction &other,
65 void init_loaded_impl ()
override { }
66 void perform_impl ()
override;
67 void undo_impl ()
override;
69 bool connect_or_disconnect (
bool connect,
bool do_it);
72 std::unique_ptr<ChannelSend> send_before_;
77 std::optional<dsp::PortUuid>
l_id_;
78 std::optional<dsp::PortUuid> r_id_;
79 std::optional<dsp::PortUuid> midi_id_;
85class ChannelSendDisconnectAction final :
public ChannelSendAction
88 ChannelSendDisconnectAction (
89 const ChannelSend &send,
91 : ChannelSendAction (Type::Disconnect, send,
nullptr, std::nullopt, 0.f, &port_connections_mgr)
96class ChannelSendConnectMidiAction final :
public ChannelSendAction
99 ChannelSendConnectMidiAction (
100 const ChannelSend &send,
103 : ChannelSendAction (Type::ConnectMidi, send, &midi, std::nullopt, 0.f, &port_connections_mgr)
108class ChannelSendConnectStereoAction final :
public ChannelSendAction
111 ChannelSendConnectStereoAction (
112 const ChannelSend &send,
113 std::pair<const dsp::AudioPort &, const dsp::AudioPort &> stereo,
115 : ChannelSendAction (Type::ConnectStereo, send,
nullptr, stereo, 0.f, &port_connections_mgr)
ChannelSendAction(Type type, const ChannelSend &send, const dsp::Port *port, std::optional< std::pair< const dsp::AudioPort &, const dsp::AudioPort & > > stereo, float amount, const dsp::PortConnectionsManager *port_connections_mgr)
Creates a new action.