29class ArrangerObjectBounds :
public QObject
38 ArrangerObjectBounds (
40 QObject * parent =
nullptr);
41 ~ArrangerObjectBounds ()
override =
default;
42 Q_DISABLE_COPY_MOVE (ArrangerObjectBounds)
50 return length_adapter_.get ();
54 Q_INVOKABLE
void setLengthTicks (
double ticks)
56 length ()->setTicks (ticks);
61 units::sample_t get_end_position_samples (
bool end_position_inclusive)
const;
72 is_hit (
const units::sample_t frames,
bool object_end_pos_inclusive =
false)
87 std::pair<units::sample_t, units::sample_t> global_frames,
88 bool range_start_inclusive =
true,
89 bool range_end_inclusive =
true,
90 bool object_end_pos_inclusive =
false)
const;
93 friend void init_from (
94 ArrangerObjectBounds &obj,
95 const ArrangerObjectBounds &other,
98 static constexpr auto kLengthKey =
"length"sv;
99 friend void to_json (nlohmann::json &j,
const ArrangerObjectBounds &
object);
100 friend void from_json (
const nlohmann::json &j, ArrangerObjectBounds &
object);
102 auto position () const -> const dsp::AtomicPositionQmlAdapter *
104 return std::addressof (position_);
bool is_hit_by_range(std::pair< units::sample_t, units::sample_t > global_frames, bool range_start_inclusive=true, bool range_end_inclusive=true, bool object_end_pos_inclusive=false) const
Whether the object is hit by the given range.