Adds length functionality to arranger objects.
More...
#include <src/structure/arrangement/bounded_object.h>
|
|
| ArrangerObjectBounds (const dsp::AtomicPositionQmlAdapter &start_position, QObject *parent=nullptr) |
| dsp::AtomicPositionQmlAdapter * | length () const |
| Q_INVOKABLE void | setLengthTicks (double ticks) |
|
units::sample_t | get_end_position_samples (bool end_position_inclusive) const |
| bool | is_hit (const units::sample_t frames, bool object_end_pos_inclusive=false) const |
| | Returns whether the object is hit by the given position (local position if non-timeline object).
|
| 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.
|
|
|
void | init_from (ArrangerObjectBounds &obj, const ArrangerObjectBounds &other, utils::ObjectCloneType clone_type) |
| auto | to_json (nlohmann::json &j, const ArrangerObjectBounds &object) |
| auto | from_json (const nlohmann::json &j, ArrangerObjectBounds &object) |
Adds length functionality to arranger objects.
It provides common functionality and properties shared by objects with length, and methods to resize and check if the object is hit by a position or range.
ArrangerObjectBounds depends on the start position of an ArrangerObject.
Definition at line 20 of file bounded_object.h.
◆ is_hit()
| bool zrythm::structure::arrangement::ArrangerObjectBounds::is_hit |
( |
const units::sample_t | frames, |
|
|
bool | object_end_pos_inclusive = false ) const |
Returns whether the object is hit by the given position (local position if non-timeline object).
- Parameters
-
| frames | Local position if non-timeline object. |
| object_end_pos_inclusive | Whether end_pos_ is considered as part of the object. This is probably always false. |
◆ is_hit_by_range()
| bool zrythm::structure::arrangement::ArrangerObjectBounds::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.
- Parameters
-
| global_frames | Start and end positions of the range, in samples. |
| range_start_inclusive | Whether the start of the range is considered as part of the range. |
| range_end_inclusive | Whether the end of the range is considered as part of the range. |
| object_end_pos_inclusive | Whether the end position of the object is considered as part of the object (this is probably always false). |
◆ length()
◆ setLengthTicks()
| Q_INVOKABLE void zrythm::structure::arrangement::ArrangerObjectBounds::setLengthTicks |
( |
double | ticks | ) |
|
|
inline |
◆ from_json
| auto from_json |
( |
const nlohmann::json & | j, |
|
|
ArrangerObjectBounds & | object ) |
|
friend |
◆ to_json
| auto to_json |
( |
nlohmann::json & | j, |
|
|
const ArrangerObjectBounds & | object ) |
|
friend |
◆ length
The documentation for this class was generated from the following file: