Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
zrythm::gui::UnifiedArrangerObjectsModel Class Reference

A unified model that concatenates multiple arranger object models. More...

#include <src/gui/backend/unified_arranger_objects_model.h>

Inheritance diagram for zrythm::gui::UnifiedArrangerObjectsModel:
Collaboration diagram for zrythm::gui::UnifiedArrangerObjectsModel:

Public Member Functions

 UnifiedArrangerObjectsModel (QObject *parent=nullptr)
 Constructor for the unified arranger objects model.
Q_INVOKABLE void addSourceModel (QAbstractItemModel *model)
 Adds a source model to the unified model.
Q_INVOKABLE void removeSourceModel (QAbstractItemModel *model)
 Removes a source model from the unified model.
Q_INVOKABLE QModelIndex mapFromSource (const QModelIndex &sourceIndex) const
 Maps a source model index to the unified model index.
Q_INVOKABLE QModelIndex mapToSource (const QModelIndex &proxyIndex) const
 Maps a unified model index to the source model index.

Detailed Description

A unified model that concatenates multiple arranger object models.

This class provides a single interface to access objects from multiple source models, allowing unified selection and manipulation across different arranger object types. It inherits from QConcatenateTablesProxyModel to combine multiple models into one.

Definition at line 21 of file unified_arranger_objects_model.h.

Constructor & Destructor Documentation

◆ UnifiedArrangerObjectsModel()

zrythm::gui::UnifiedArrangerObjectsModel::UnifiedArrangerObjectsModel ( QObject * parent = nullptr)
explicit

Constructor for the unified arranger objects model.

Parameters
parentParent QObject (optional).

Member Function Documentation

◆ addSourceModel()

Q_INVOKABLE void zrythm::gui::UnifiedArrangerObjectsModel::addSourceModel ( QAbstractItemModel * model)

Adds a source model to the unified model.

Parameters
modelThe model to add.

◆ mapFromSource()

Q_INVOKABLE QModelIndex zrythm::gui::UnifiedArrangerObjectsModel::mapFromSource ( const QModelIndex & sourceIndex) const

Maps a source model index to the unified model index.

Parameters
sourceIndexThe index in the source model.
Returns
The corresponding index in the unified model.

◆ mapToSource()

Q_INVOKABLE QModelIndex zrythm::gui::UnifiedArrangerObjectsModel::mapToSource ( const QModelIndex & proxyIndex) const

Maps a unified model index to the source model index.

Parameters
proxyIndexThe index in the unified model.
Returns
The corresponding index in the source model.

◆ removeSourceModel()

Q_INVOKABLE void zrythm::gui::UnifiedArrangerObjectsModel::removeSourceModel ( QAbstractItemModel * model)

Removes a source model from the unified model.

Parameters
modelThe model to remove.

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