Zrythm v2.0.0-alpha.1+31.4967fd053471
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::qquick::ChordRegionSegmenter Class Reference

Reactive QML type that observes a ChordRegion and exposes a QAbstractItemModel of ChordSegment rows. More...

#include <src/gui/qquick/chord_region_segmenter.h>

Inheritance diagram for zrythm::gui::qquick::ChordRegionSegmenter:
Collaboration diagram for zrythm::gui::qquick::ChordRegionSegmenter:

Public Member Functions

 ChordRegionSegmenter (QObject *parent=nullptr)
zrythm::structure::arrangement::ChordRegionregion () const
void setRegion (zrythm::structure::arrangement::ChordRegion *region)
QAbstractItemModel * segments () const
Q_SIGNAL void regionChanged ()
Q_SIGNAL void segmentsChanged ()

Properties

zrythm::structure::arrangement::ChordRegionregion
QAbstractItemModel * segments

Detailed Description

Reactive QML type that observes a ChordRegion and exposes a QAbstractItemModel of ChordSegment rows.

Each row represents one chord as it should be drawn within the region's timeline bounds, taking loop iterations into account.

On any relevant input change (chord added/removed/moved, loop config changed, region resized), recalculate() rebuilds the segment list, a new QRangeModel is constructed (moving the data in), and segmentsChanged() is emitted.

Loop-expansion algorithm is ported from midi_region_canvas_renderer.cpp and shares the same semantics as MIDI region rendering.

Definition at line 94 of file chord_region_segmenter.h.

Member Function Documentation

◆ region()

zrythm::structure::arrangement::ChordRegion * zrythm::gui::qquick::ChordRegionSegmenter::region ( ) const
inline

Definition at line 104 of file chord_region_segmenter.h.

◆ segments()

QAbstractItemModel * zrythm::gui::qquick::ChordRegionSegmenter::segments ( ) const
inline

Definition at line 110 of file chord_region_segmenter.h.

Property Documentation

◆ region

zrythm::structure::arrangement::ChordRegion * zrythm::gui::qquick::ChordRegionSegmenter::region
readwrite

Definition at line 97 of file chord_region_segmenter.h.

◆ segments

QAbstractItemModel * zrythm::gui::qquick::ChordRegionSegmenter::segments
read

Definition at line 98 of file chord_region_segmenter.h.


The documentation for this class was generated from the following file: