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
15#include <qqmlregistration.h>
16
17class KDescendantsProxyModelQml : public KDescendantsProxyModel
18{
19 Q_OBJECT
20 QML_NAMED_ELEMENT(KDescendantsProxyModel)
21
22public:
23 explicit KDescendantsProxyModelQml(QObject *parent = nullptr);
24 ~KDescendantsProxyModelQml() override;
25
26 Q_INVOKABLE void expandChildren(int row);
27 Q_INVOKABLE void collapseChildren(int row);
28 Q_INVOKABLE void toggleChildren(int row);
29};
30

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