Plasma-workspace

flattentaskgroupsproxymodel.h
1/*
2 SPDX-FileCopyrightText: 2016 Eike Hein <hein@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5*/
6
7#pragma once
8
9#include "abstracttasksproxymodeliface.h"
10
11#include <KDescendantsProxyModel>
12
13#include "taskmanager_export.h"
14
15namespace TaskManager
16{
17/**
18 * @short A proxy tasks model for flattening a tree-structured tasks model
19 * into a list-structured tasks model.
20 *
21 * This proxy model is a subclass of KDescendantsProxyModel implementing
22 * AbstractTasksModelIface.
23 *
24 * @author Eike Hein <hein@kde.org>
25 **/
26
27class TASKMANAGER_EXPORT FlattenTaskGroupsProxyModel : public KDescendantsProxyModel, public AbstractTasksProxyModelIface
28{
30
31public:
32 explicit FlattenTaskGroupsProxyModel(QObject *parent = nullptr);
33 ~FlattenTaskGroupsProxyModel() override;
34
35 void setSourceModel(QAbstractItemModel *sourceModel) override;
36
37protected:
38 QModelIndex mapIfaceToSource(const QModelIndex &index) const override;
39
40private:
41 class Private;
42 std::unique_ptr<Private> d;
43};
44
45}
KDescendantsProxyModel(QObject *parent=nullptr)
Pure method interface for tasks model implementations.
QAbstractItemModel(QObject *parent)
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const=0
virtual QModelIndex parent(const QModelIndex &index) const const=0
Q_OBJECTQ_OBJECT
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Feb 21 2025 11:51:10 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.