|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Tracklist selections (tracks) action. More...
#include <src/gui/backend/backend/legacy_actions/tracklist_selections_action.h>


Public Types | |
| enum class | Type { Copy , CopyInside , Create , Delete , Edit , Move , MoveInside , Pin , Unpin } |
| enum class | EditType { Solo , SoloLane , Mute , MuteLane , Listen , Enable , Fold , Volume , Pan , DirectOut , Rename , RenameLane , Color , Comment , Icon , MidiFaderMode } |
| using | Position = zrythm::dsp::Position |
| using | Color = zrythm::utils::Color |
| using | PortType = zrythm::dsp::PortType |
| using | PluginConfiguration = zrythm::plugins::PluginConfiguration |
| Public Types inherited from zrythm::gui::actions::UndoableAction | |
| enum class | Type { TracklistSelections , ChannelSend , MixerSelections , ArrangerSelections , MidiMapping , PortConnection , Port , Range , Transport , Chord } |
| Type of UndoableAction. More... | |
| using | PortConnectionsManager = dsp::PortConnectionsManager |
Public Member Functions | |
| TracklistSelectionsAction (Type type, std::optional< TrackSpan > tls_before_var, std::optional< TrackSpan > tls_after_var, const PortConnectionsManager *port_connections_mgr, std::optional< TrackPtrVariant > track_var, Track::Type track_type, const PluginConfiguration *pl_setting, const FileDescriptor *file_descr, int track_pos, int lane_pos, const Position *pos, int num_tracks, EditType edit_type, int ival_after, const Color *color_new, float val_before, float val_after, const utils::Utf8String *new_txt, bool already_edited) | |
| Creates a new TracklistSelectionsAction. | |
| TracklistSelectionsAction (Track::Type track_type, const PluginConfiguration *pl_setting, const FileDescriptor *file_descr, int track_pos, const Position *pos, int num_tracks, int disable_track_pos) | |
| Constructor for a Create action. | |
| QString | to_string () const final |
| Stringizes the action to be used in Undo/Redo buttons. | |
| bool | needs_transport_total_bar_update (bool perform) const override |
| Returns whether the total transport bars need to be recalculated. | |
| bool | needs_pause () const override |
| Returns whether the action requires pausing the engine. | |
| void | get_plugins (std::vector< zrythm::plugins::Plugin * > &plugins) override |
| Public Member Functions inherited from zrythm::gui::actions::UndoableAction | |
| UndoableAction (Type type) | |
| UndoableAction (Type type, dsp::FramesPerTick frames_per_tick, units::sample_rate_t sample_rate) | |
| void | init_loaded (sample_rate_t engine_sample_rate) |
| Non virtual function following the NVI pattern. | |
| virtual bool | affects_audio_region_internal_positions () const |
| Whether audio region loop/fade/etc. | |
| virtual void | get_plugins (std::vector< plugins::Plugin * > &plugins) |
| Get the plugins referenced in this action. | |
| auto | get_frames_per_tick () const |
| auto | get_ticks_per_frame () const |
| void | set_num_actions (int num_actions) |
| Sets the number of actions for this action. | |
| void | save_or_load_port_connections (bool performing) |
| To be used by actions that save/load port connections. | |
| void | perform () |
| Performs the action. | |
| void | undo () |
| Undoes the action. | |
Data Fields | |
| Type | tracklist_selections_action_type_ {} |
| Type of action. | |
| int | track_pos_ = 0 |
| Position to make the tracks at. | |
| int | lane_pos_ = 0 |
| Lane position, if editing lane. | |
| Position | pos_ |
| Position to add the audio region to, if applicable. | |
| bool | have_pos_ = false |
| Track::Type | track_type_ {} |
| Track type. | |
| bool | is_empty_ = false |
| Flag to know if we are making an empty track. | |
| std::unique_ptr< PluginConfiguration > | pl_setting_ |
| PluginConfiguration, if making an instrument or bus track from a plugin. | |
| fs::path | file_basename_ |
| The basename of the file, if any. | |
| utils::Utf8String | base64_midi_ |
| If this is an action to create a MIDI track from a MIDI file, this is the base64 representation so that the file does not need to be stored in the project. | |
| std::optional< dsp::FileAudioSourceUuidReference > | pool_id_ |
| If this is an action to create an Audio track from an audio file, this is the pool ID of the audio file. | |
| std::vector< std::optional< Track::Uuid > > | out_track_uuids_ |
| Direct out tracks of the original tracks. | |
| int | num_fold_change_tracks_ {} |
| Number of tracks under folder affected. | |
| EditType | edit_type_ {} |
| std::vector< int > | track_positions_before_ |
| Track positions. | |
| std::vector< int > | track_positions_after_ |
| int | num_tracks_ = 0 |
| Number of tracks. | |
| std::optional< std::vector< TrackPtrVariant > > | tls_before_ |
| Clone of the TracklistSelections, if applicable. | |
| std::optional< std::vector< TrackPtrVariant > > | tls_after_ |
| Clone of the TracklistSelections, if applicable. | |
| std::optional< std::vector< TrackPtrVariant > > | foldable_tls_before_ |
| Foldable tracks before the change, used when undoing to set the correct sizes. | |
| std::vector< int > | ival_before_ |
| Int value. | |
| int | ival_after_ = 0 |
| std::vector< Color > | colors_before_ |
| Color | new_color_ |
| utils::Utf8String | new_txt_ |
| bool | already_edited_ = false |
| Skip do if true. | |
| float | val_before_ = 0.f |
| Float values. | |
| float | val_after_ = 0.f |
| Data Fields inherited from zrythm::gui::actions::UndoableAction | |
| Type | undoable_action_type_ {} |
| Undoable action type. | |
| dsp::FramesPerTick | frames_per_tick_ |
| A snapshot of AudioEngine.frames_per_tick when the action is executed. | |
| units::sample_rate_t | sample_rate_ = 0 |
| Sample rate of this action. | |
| int | num_actions_ = 1 |
| Number of actions to perform. | |
| std::unique_ptr< dsp::PortConnectionsManager > | port_connections_before_ |
| An (optional) clone of the port connections at the start of the action, used for reverting port connections when undoing. | |
| std::unique_ptr< dsp::PortConnectionsManager > | port_connections_after_ |
Friends | |
| void | init_from (TracklistSelectionsAction &obj, const TracklistSelectionsAction &other, utils::ObjectCloneType clone_type) |
Tracklist selections (tracks) action.
Definition at line 21 of file tracklist_selections_action.h.
| using zrythm::gui::actions::TracklistSelectionsAction::Color = zrythm::utils::Color |
Definition at line 75 of file tracklist_selections_action.h.
| using zrythm::gui::actions::TracklistSelectionsAction::PluginConfiguration = zrythm::plugins::PluginConfiguration |
Definition at line 77 of file tracklist_selections_action.h.
| using zrythm::gui::actions::TracklistSelectionsAction::PortType = zrythm::dsp::PortType |
Definition at line 76 of file tracklist_selections_action.h.
| using zrythm::gui::actions::TracklistSelectionsAction::Position = zrythm::dsp::Position |
Definition at line 74 of file tracklist_selections_action.h.
|
strong |
| Enumerator | |
|---|---|
| DirectOut | Direct out change. |
| Rename | Rename track. |
| RenameLane | Rename lane. |
Definition at line 46 of file tracklist_selections_action.h.
|
strong |
Definition at line 33 of file tracklist_selections_action.h.
| zrythm::gui::actions::TracklistSelectionsAction::TracklistSelectionsAction | ( | Type | type, |
| std::optional< TrackSpan > | tls_before_var, | ||
| std::optional< TrackSpan > | tls_after_var, | ||
| const PortConnectionsManager * | port_connections_mgr, | ||
| std::optional< TrackPtrVariant > | track_var, | ||
| Track::Type | track_type, | ||
| const PluginConfiguration * | pl_setting, | ||
| const FileDescriptor * | file_descr, | ||
| int | track_pos, | ||
| int | lane_pos, | ||
| const Position * | pos, | ||
| int | num_tracks, | ||
| EditType | edit_type, | ||
| int | ival_after, | ||
| const Color * | color_new, | ||
| float | val_before, | ||
| float | val_after, | ||
| const utils::Utf8String * | new_txt, | ||
| bool | already_edited ) |
Creates a new TracklistSelectionsAction.
| tls_before | Tracklist selections to act upon. |
| port_connections_mgr | Port connections manager at the start of the action. |
| pos | Position to make the tracks at. |
| pl_setting | Plugin setting, if any. |
| track | Track, if single-track action. Used if tls_before and tls_after are NULL. |
| ZrythmException | on error. |
|
inline |
Constructor for a Create action.
Definition at line 119 of file tracklist_selections_action.h.
|
inlineoverride |
Definition at line 183 of file tracklist_selections_action.h.
|
inlineoverridevirtual |
Returns whether the action requires pausing the engine.
Reimplemented from zrythm::gui::actions::UndoableAction.
Definition at line 168 of file tracklist_selections_action.h.
|
inlineoverridevirtual |
Returns whether the total transport bars need to be recalculated.
Reimplemented from zrythm::gui::actions::UndoableAction.
Definition at line 152 of file tracklist_selections_action.h.
|
finalvirtual |
Stringizes the action to be used in Undo/Redo buttons.
Implements zrythm::gui::actions::UndoableAction.
| bool zrythm::gui::actions::TracklistSelectionsAction::already_edited_ = false |
Skip do if true.
Definition at line 371 of file tracklist_selections_action.h.
| utils::Utf8String zrythm::gui::actions::TracklistSelectionsAction::base64_midi_ |
If this is an action to create a MIDI track from a MIDI file, this is the base64 representation so that the file does not need to be stored in the project.
Definition at line 302 of file tracklist_selections_action.h.
| std::vector<Color> zrythm::gui::actions::TracklistSelectionsAction::colors_before_ |
Definition at line 365 of file tracklist_selections_action.h.
| EditType zrythm::gui::actions::TracklistSelectionsAction::edit_type_ {} |
Definition at line 324 of file tracklist_selections_action.h.
| fs::path zrythm::gui::actions::TracklistSelectionsAction::file_basename_ |
The basename of the file, if any.
This will be used as the track name.
Definition at line 291 of file tracklist_selections_action.h.
| std::optional<std::vector<TrackPtrVariant> > zrythm::gui::actions::TracklistSelectionsAction::foldable_tls_before_ |
Foldable tracks before the change, used when undoing to set the correct sizes.
Definition at line 351 of file tracklist_selections_action.h.
| bool zrythm::gui::actions::TracklistSelectionsAction::have_pos_ = false |
Definition at line 271 of file tracklist_selections_action.h.
| bool zrythm::gui::actions::TracklistSelectionsAction::is_empty_ = false |
Flag to know if we are making an empty track.
Definition at line 277 of file tracklist_selections_action.h.
| int zrythm::gui::actions::TracklistSelectionsAction::ival_after_ = 0 |
Definition at line 361 of file tracklist_selections_action.h.
| std::vector<int> zrythm::gui::actions::TracklistSelectionsAction::ival_before_ |
| int zrythm::gui::actions::TracklistSelectionsAction::lane_pos_ = 0 |
Lane position, if editing lane.
Definition at line 265 of file tracklist_selections_action.h.
| Color zrythm::gui::actions::TracklistSelectionsAction::new_color_ |
Definition at line 366 of file tracklist_selections_action.h.
| utils::Utf8String zrythm::gui::actions::TracklistSelectionsAction::new_txt_ |
Definition at line 368 of file tracklist_selections_action.h.
| int zrythm::gui::actions::TracklistSelectionsAction::num_fold_change_tracks_ {} |
Number of tracks under folder affected.
Counter to be filled while doing to be used when undoing.
Definition at line 322 of file tracklist_selections_action.h.
| int zrythm::gui::actions::TracklistSelectionsAction::num_tracks_ = 0 |
Number of tracks.
This counter is used in various cases.
Definition at line 339 of file tracklist_selections_action.h.
| std::vector<std::optional<Track::Uuid> > zrythm::gui::actions::TracklistSelectionsAction::out_track_uuids_ |
Direct out tracks of the original tracks.
Definition at line 315 of file tracklist_selections_action.h.
| std::unique_ptr<PluginConfiguration> zrythm::gui::actions::TracklistSelectionsAction::pl_setting_ |
PluginConfiguration, if making an instrument or bus track from a plugin.
If this is empty and the track type is instrument, it is assumed that it's an empty track.
Definition at line 284 of file tracklist_selections_action.h.
| std::optional<dsp::FileAudioSourceUuidReference> zrythm::gui::actions::TracklistSelectionsAction::pool_id_ |
If this is an action to create an Audio track from an audio file, this is the pool ID of the audio file.
If this is not -1, this means that an audio file exists in the pool.
Definition at line 310 of file tracklist_selections_action.h.
| Position zrythm::gui::actions::TracklistSelectionsAction::pos_ |
Position to add the audio region to, if applicable.
Definition at line 269 of file tracklist_selections_action.h.
| std::optional<std::vector<TrackPtrVariant> > zrythm::gui::actions::TracklistSelectionsAction::tls_after_ |
Clone of the TracklistSelections, if applicable.
Definition at line 345 of file tracklist_selections_action.h.
| std::optional<std::vector<TrackPtrVariant> > zrythm::gui::actions::TracklistSelectionsAction::tls_before_ |
Clone of the TracklistSelections, if applicable.
Definition at line 342 of file tracklist_selections_action.h.
| int zrythm::gui::actions::TracklistSelectionsAction::track_pos_ = 0 |
Position to make the tracks at.
Used when undoing too.
Definition at line 262 of file tracklist_selections_action.h.
| std::vector<int> zrythm::gui::actions::TracklistSelectionsAction::track_positions_after_ |
Definition at line 332 of file tracklist_selections_action.h.
| std::vector<int> zrythm::gui::actions::TracklistSelectionsAction::track_positions_before_ |
Track positions.
Used for actions where full selection clones are not needed.
Definition at line 331 of file tracklist_selections_action.h.
| Track::Type zrythm::gui::actions::TracklistSelectionsAction::track_type_ {} |
Track type.
Definition at line 274 of file tracklist_selections_action.h.
| Type zrythm::gui::actions::TracklistSelectionsAction::tracklist_selections_action_type_ {} |
Type of action.
Definition at line 257 of file tracklist_selections_action.h.
| float zrythm::gui::actions::TracklistSelectionsAction::val_after_ = 0.f |
Definition at line 375 of file tracklist_selections_action.h.
| float zrythm::gui::actions::TracklistSelectionsAction::val_before_ = 0.f |
Float values.
Definition at line 374 of file tracklist_selections_action.h.