Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
unified_arranger_objects_model.h
1// SPDX-FileCopyrightText: © 2025 Alexandros Theodotou <alex@zrythm.org>
2// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4#pragma once
5
6#include <QConcatenateTablesProxyModel>
7#include <QObject>
8#include <QtQmlIntegration>
9
10namespace zrythm::gui
11{
12
21class UnifiedArrangerObjectsModel : public QConcatenateTablesProxyModel
22{
23 Q_OBJECT
24 QML_ELEMENT
25
26public:
31 explicit UnifiedArrangerObjectsModel (QObject * parent = nullptr);
32
37 Q_INVOKABLE void addSourceModel (QAbstractItemModel * model);
38
43 Q_INVOKABLE void removeSourceModel (QAbstractItemModel * model);
44
50 Q_INVOKABLE QModelIndex mapFromSource (const QModelIndex &sourceIndex) const;
51
57 Q_INVOKABLE QModelIndex mapToSource (const QModelIndex &proxyIndex) const;
58};
59}
Q_INVOKABLE void addSourceModel(QAbstractItemModel *model)
Adds a source model to the unified model.
UnifiedArrangerObjectsModel(QObject *parent=nullptr)
Constructor for the unified arranger objects model.
Q_INVOKABLE QModelIndex mapToSource(const QModelIndex &proxyIndex) const
Maps a unified model index to the source model index.
Q_INVOKABLE QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
Maps a source model index to the unified model index.
Q_INVOKABLE void removeSourceModel(QAbstractItemModel *model)
Removes a source model from the unified model.