1/*
2 SPDX-FileCopyrightText: 2020 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7// This class exposes KDescendantsProxyModel in a more QML friendly way
8
9#pragma once
10
11#include <KDescendantsProxyModel>
12#include <QObject>
13#include <QPointer>
14
15class KDescendantsProxyModelQml : public KDescendantsProxyModel
16{
17 Q_OBJECT
18
19public:
20 explicit KDescendantsProxyModelQml(QObject *parent = nullptr);
21 ~KDescendantsProxyModelQml() override;
22
23 Q_INVOKABLE void expandChildren(int row);
24 Q_INVOKABLE void collapseChildren(int row);
25 Q_INVOKABLE void toggleChildren(int row);
26};
27

source code of kitemmodels/src/qml/kdescendantsproxymodel_qml.h