|
Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
|
Marker for the MarkerTrack. More...
#include <src/gui/dsp/marker.h>


Public Types | |
| enum class | Type { Start , End , Custom } |
| Marker type. More... | |
Public Types inherited from ArrangerObject | |
| enum class | ResizeType { Normal , Loop , Fade , Stretch , StretchTempoChange } |
| Flag used in some functions. More... | |
| enum class | Type { MidiRegion , AudioRegion , ChordRegion , AutomationRegion , MidiNote , ChordObject , ScaleObject , Marker , AutomationPoint } |
| The type of the object. More... | |
| enum class | Flags { NonProject = 1 << 0 } |
| Flags. More... | |
| enum class | PositionType { Start , End , ClipStart , LoopStart , LoopEnd , FadeIn , FadeOut } |
| using | SelectionStatusGetter = std::function<bool (const Uuid &)> |
| using | Position = zrythm::dsp::Position |
| using | ArrangerObjectPtr = ArrangerObject * |
Public Types inherited from NamedObject | |
| using | NameValidator = std::function<bool (const utils::Utf8String &)> |
Public Member Functions | |
| Marker (ArrangerObjectRegistry &obj_registry, TrackResolver track_resolver, NameValidator name_validator, QObject *parent=nullptr) | |
| bool | is_start () const |
| bool | is_end () const |
| bool | is_deletable () const override |
| Returns whether the given object is deletable or not (eg, start marker). | |
| void | init_after_cloning (const Marker &other, ObjectCloneType clone_type) override |
| Initializes the cloned object. | |
| ArrangerObjectPtrVariant | add_clone_to_project (bool fire_events) const override |
| Appends the ArrangerObject to where it belongs in the project (eg, a Track), without taking into account its previous index (eg, before deletion if undoing). | |
| ArrangerObjectPtrVariant | insert_clone_to_project () const override |
| Inserts the object where it belongs in the project (eg, a Track). | |
| bool | validate (bool is_project, dsp::FramesPerTick frames_per_tick) const override |
| Validates the arranger object. | |
Public Member Functions inherited from ArrangerObject | |
| auto | get_type () const |
| bool | is_start_hit_by_range (const dsp::Position &start, const dsp::Position &end, bool range_start_inclusive=true, bool range_end_inclusive=false) const |
| Returns whether the given object is hit by the given range. | |
| bool | is_start_hit_by_range (const signed_frame_t global_frames_start, const signed_frame_t global_frames_end, bool range_start_inclusive=true, bool range_end_inclusive=false) const |
| void | set_parent_on_base_qproperties (QObject &derived) |
| Set the parent on QObject's that are children of this class. | |
| auto | get_position () const |
| Getter. | |
| void | position_setter_validated (const dsp::Position &pos, dsp::TicksPerFrame ticks_per_frame) |
| The setter is for use in e.g. | |
| void | set_position_unvalidated (const dsp::Position &pos) |
| bool | is_position_valid (const dsp::Position &pos, PositionType pos_type, dsp::TicksPerFrame ticks_per_frame) const |
| Returns if the given Position is valid. | |
| bool | set_position (const dsp::Position &pos, PositionType pos_type, bool validate, dsp::TicksPerFrame ticks_per_frame) |
| Sets the given position on the object, optionally attempting to validate before. | |
| void | move (double ticks, dsp::FramesPerTick frames_per_tick) |
| Moves the object by the given amount of ticks. | |
| void | set_track_id (const TrackUuid &track_id) |
| void | set_track_id (std::optional< TrackUuid > track_id) |
| void | unset_track_id () |
| void | update_positions (bool from_ticks, bool bpm_change, dsp::FramesPerTick frames_per_tick) |
| Updates the positions in each child recursively. | |
| auto | get_track () const |
| Returns the Track this ArrangerObject is in. | |
| std::optional< TrackUuid > | get_track_id () const |
| std::optional< ArrangerObjectPtrVariant > | remove_from_project (bool free_obj, bool fire_events=false) |
| Removes the object (which can be obtained from find_in_project()) from its parent in the project. | |
| void | set_selection_status_getter (SelectionStatusGetter getter) |
| void | unset_selection_status_getter () |
Public Member Functions inherited from zrythm::utils::UuidIdentifiableObject< ArrangerObject > | |
| UuidIdentifiableObject (const Uuid &id) | |
| UuidIdentifiableObject (const UuidIdentifiableObject &other)=default | |
| UuidIdentifiableObject (UuidIdentifiableObject &&other)=default | |
| UuidIdentifiableObject & | operator= (const UuidIdentifiableObject &other)=default |
| UuidIdentifiableObject & | operator= (UuidIdentifiableObject &&other)=default |
| auto | get_uuid () const |
| void | copy_members_from (const UuidIdentifiableObject &other) |
Public Member Functions inherited from NamedObject | |
| NamedObject (NameValidator validator=[](const utils::Utf8String &) { return true;}) | |
| utils::Utf8String | get_name () const |
| Returns the name of the object. | |
| void | gen_escaped_name () |
| Generates the escaped name for the object. | |
| void | set_name (this auto &&self, const utils::Utf8String &name) |
| Sets the name of the object. | |
| void | generate_name_from_automation_track (this auto &self, const auto &track, const auto &at) |
| void | generate_name_from_track (this auto &self, const auto &track) |
| void | generate_name (this auto &self, std::optional< utils::Utf8String > base_name, const auto *at, const auto *track) |
| void | set_name_with_action (const utils::Utf8String &name) |
| Changes the name and adds an action to the undo stack. | |
| utils::Utf8String | gen_human_friendly_name () const final |
| Generates a human readable name for the object. | |
Public Member Functions inherited from ICloneable< Marker > | |
| std::unique_ptr< Marker > | clone_unique (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| std::shared_ptr< Marker > | clone_shared (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| Marker * | clone_raw_ptr (ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| Marker * | clone_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
| QScopedPointer< Marker > | clone_unique_qobject (QObject *parent, ObjectCloneType clone_type=ObjectCloneType::Snapshot, Args &&... args) const |
Data Fields | |
| Type | marker_type_ = Type::Custom |
| Marker type. | |
Data Fields inherited from ArrangerObject | |
| Flags | flags_ {} |
| Track this object belongs to (cache to be set during graph calculation). | |
Data Fields inherited from ICloneable< Marker > | |
| friend | Derived |
Friends | |
| void | to_json (nlohmann::json &j, const Marker &m) |
| void | from_json (const nlohmann::json &j, Marker &m) |
Additional Inherited Members | |
Static Public Attributes inherited from ArrangerObject | |
| static constexpr double | DEFAULT_NUDGE_TICKS = 0.1 |
Protected Member Functions inherited from TimelineObject | |
| void | copy_members_from (const TimelineObject &other, ObjectCloneType clone_type) |
Protected Member Functions inherited from ArrangerObject | |
| ArrangerObject (Type type, TrackResolver track_resolver) noexcept | |
| void | copy_members_from (const ArrangerObject &other, ObjectCloneType clone_type) |
| bool | are_members_valid (bool is_project, dsp::FramesPerTick frames_per_tick) const |
| To be called by validate() implementations. | |
Protected Member Functions inherited from NamedObject | |
| void | copy_members_from (const NamedObject &other, ObjectCloneType clone_type) |
Protected Attributes inherited from ArrangerObject | |
| TrackResolver | track_resolver_ |
| PositionProxy * | pos_ = nullptr |
| Position (or start Position if the object has length). | |
| std::optional< TrackUuid > | track_id_ |
| ID of the track this object belongs to. | |
| std::optional< SelectionStatusGetter > | selection_status_getter_ |
| Whether part of an auditioner track. | |
Protected Attributes inherited from NamedObject | |
| utils::Utf8String | name_ |
| Name to be shown on the widget. | |
| utils::Utf8String | escaped_name_ |
| Escaped name for drawing. | |
| NameValidator | name_validator_ |
Marker for the MarkerTrack.
|
strong |
|
overridevirtual |
Appends the ArrangerObject to where it belongs in the project (eg, a Track), without taking into account its previous index (eg, before deletion if undoing).
| ZrythmError | on failure. |
Implements ArrangerObject.
|
overridevirtual |
Initializes the cloned object.
| ZrythmException | If the object could not be cloned. |
Implements ICloneable< Marker >.
|
overridevirtual |
Inserts the object where it belongs in the project (eg, a Track).
This function assumes that the object already knows the index where it should be inserted in its parent.
This is mostly used when undoing.
| ZrythmException | on failure. |
Implements ArrangerObject.
|
inlineoverridevirtual |
Returns whether the given object is deletable or not (eg, start marker).
Reimplemented from ArrangerObject.
|
overridevirtual |
Validates the arranger object.
| frames_per_tick | Frames per tick used when validating audio regions. Passing 0 will use the value from the current engine. |
Must only be implemented by final objects.
Implements ArrangerObject.
|
friend |
|
friend |
| Type Marker::marker_type_ = Type::Custom |