KItemModels

kdescendantsproxymodel_qml.h
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{
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};
Proxy Model for restructuring a Tree into a list.
Q_INVOKABLEQ_INVOKABLE
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:18:35 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.