|
Zrythm v2.0.0-alpha.1+31.4967fd053471
a highly automated and intuitive digital audio workstation
|
Derived QAbstractListModel that lists the unique chords used in a ChordRegion, grouped by ChordDescriptor::isEquivalent. More...
#include <src/gui/qquick/chord_row_list_model.h>


Public Types | |
| enum | Roles { ChordNameRole = Qt::UserRole + 1 , ChordDescriptorRole , ChordObjectCountRole } |
Public Member Functions | |
| ChordRowListModel (QObject *parent=nullptr) | |
| structure::arrangement::ChordRegion * | region () const |
| void | setRegion (structure::arrangement::ChordRegion *region) |
| QHash< int, QByteArray > | roleNames () const override |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role=Qt::DisplayRole) const override |
| Q_INVOKABLE int | rowForChordObject (zrythm::structure::arrangement::ChordObject *object) const |
| Returns the row index (into this model) that the given chord object belongs to, or -1 if not found. | |
| Q_INVOKABLE zrythm::dsp::ChordDescriptor * | descriptorAtRow (int row) const |
| Returns the representative ChordDescriptor for the given row. | |
| Q_INVOKABLE QVariantList | chordObjectsAtRow (int row) const |
| Returns all ChordObjects on the given row (for batch editing). | |
| Q_SIGNAL void | regionChanged () |
| Q_SIGNAL void | contentChanged () |
| Emitted after every rebuild (when chord objects are added, removed, moved, or have their descriptors changed). | |
Properties | |
| zrythm::structure::arrangement::ChordRegion * | region |
Derived QAbstractListModel that lists the unique chords used in a ChordRegion, grouped by ChordDescriptor::isEquivalent.
Each row represents one unique chord. Rows are sorted alphabetically by display name.
Definition at line 24 of file chord_row_list_model.h.
| enum zrythm::gui::qquick::ChordRowListModel::Roles |
Definition at line 31 of file chord_row_list_model.h.
| Q_SIGNAL void zrythm::gui::qquick::ChordRowListModel::contentChanged | ( | ) |
Emitted after every rebuild (when chord objects are added, removed, moved, or have their descriptors changed).
QML delegates use this to recompute derived span widths and row positions.
|
inline |
Definition at line 41 of file chord_row_list_model.h.
|
readwrite |
Definition at line 27 of file chord_row_list_model.h.