Zrythm
v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
track_filter_proxy_model.h
1
// SPDX-FileCopyrightText: © 2024-2025 Alexandros Theodotou <alex@zrythm.org>
2
// SPDX-License-Identifier: LicenseRef-ZrythmLicense
3
4
#pragma once
5
6
#include <QSortFilterProxyModel>
7
#include <QtQmlIntegration/qqmlintegration.h>
8
9
namespace
zrythm::gui
10
{
11
class
TrackFilterProxyModel :
public
QSortFilterProxyModel
12
{
13
Q_OBJECT
14
QML_ELEMENT
15
16
public
:
17
explicit
TrackFilterProxyModel (QObject * parent =
nullptr
);
18
19
Q_INVOKABLE
void
addVisibilityFilter (
bool
visible);
20
Q_INVOKABLE
void
addPinnedFilter (
bool
pinned);
21
Q_INVOKABLE
void
addChannelFilter (
bool
channel);
22
Q_INVOKABLE
void
clearFilters ();
23
24
protected
:
25
bool
filterAcceptsRow (
int
source_row,
const
QModelIndex &source_parent)
26
const override
;
27
28
private
:
29
bool
use_visible_filter_ =
false
;
30
bool
visible_filter_ =
true
;
31
bool
use_pinned_filter_ =
false
;
32
bool
pinned_filter_ =
false
;
33
bool
use_channel_filter_ =
false
;
34
bool
channel_filter_ =
false
;
35
};
36
}
// namespace zrythm::gui
src
gui
backend
track_filter_proxy_model.h
Generated by
1.15.0