4#ifndef __AUDIO_MARKER_H__
5#define __AUDIO_MARKER_H__
13#include "gui/dsp/bounded_object.h"
14#include "gui/dsp/named_object.h"
15#include "gui/dsp/timeline_object.h"
16#include "utils/icloneable.h"
23 public TimelineObject,
25 public ICloneable<Marker>
29 DEFINE_ARRANGER_OBJECT_QML_PROPERTIES (Marker)
30 DEFINE_NAMEABLE_OBJECT_QML_PROPERTIES (Marker)
47 ArrangerObjectRegistry &obj_registry,
48 TrackResolver track_resolver,
49 NameValidator name_validator,
50 QObject * parent =
nullptr);
63 ArrangerObjectPtrVariant
72 static constexpr std::string_view kMarkerTypeKey =
"markerType";
73 friend void to_json (nlohmann::json &j,
const Marker &m)
75 to_json (j,
static_cast<const ArrangerObject &
> (m));
76 to_json (j,
static_cast<const NamedObject &
> (m));
79 friend void from_json (
const nlohmann::json &j,
Marker &m)
93 "Marker[name: {}, type: {}, position: {}]", m.
get_name (),
Base class for all objects in the arranger.
auto get_position() const
Getter.
Marker for the MarkerTrack.
void init_after_cloning(const Marker &other, ObjectCloneType clone_type) override
Initializes the cloned object.
@ End
Song end Marker that cannot be deleted.
@ Start
Song start Marker that cannot be deleted.
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 acco...
ArrangerObjectPtrVariant insert_clone_to_project() const override
Inserts the object where it belongs in the project (eg, a Track).
bool is_deletable() const override
Returns whether the given object is deletable or not (eg, start marker).
bool validate(bool is_project, dsp::FramesPerTick frames_per_tick) const override
Validates the arranger object.
Type marker_type_
Marker type.
Base class for objects that have a name.
utils::Utf8String get_name() const
Returns the name of the object.
#define DEFINE_OBJECT_FORMATTER(obj_type, function_prefix, formatter_func)
Defines a formatter for the given object type.