File indexing completed on 2024-04-28 03:56:15

0001 /*
0002     SPDX-FileCopyrightText: 2020 Marco Martin <mart@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 // This class exposes KDescendantsProxyModel in a more QML friendly way
0008 
0009 #pragma once
0010 
0011 #include <KDescendantsProxyModel>
0012 #include <QObject>
0013 #include <QPointer>
0014 
0015 class KDescendantsProxyModelQml : public KDescendantsProxyModel
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     explicit KDescendantsProxyModelQml(QObject *parent = nullptr);
0021     ~KDescendantsProxyModelQml() override;
0022 
0023     Q_INVOKABLE void expandChildren(int row);
0024     Q_INVOKABLE void collapseChildren(int row);
0025     Q_INVOKABLE void toggleChildren(int row);
0026 };