3
0
mirror of https://github.com/Qortal/Brooklyn.git synced 2025-01-31 07:12:18 +00:00
Brooklyn/plasma/workspace/libtaskmanager/flattentaskgroupsproxymodel.cpp
2022-03-05 22:41:29 +05:00

46 lines
1.0 KiB
C++

/*
SPDX-FileCopyrightText: 2016 Eike Hein <hein@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#include "flattentaskgroupsproxymodel.h"
namespace TaskManager
{
class Q_DECL_HIDDEN FlattenTaskGroupsProxyModel::Private
{
public:
Private(FlattenTaskGroupsProxyModel *q);
AbstractTasksModelIface *sourceTasksModel = nullptr;
};
FlattenTaskGroupsProxyModel::Private::Private(FlattenTaskGroupsProxyModel *)
{
}
FlattenTaskGroupsProxyModel::FlattenTaskGroupsProxyModel(QObject *parent)
: KDescendantsProxyModel(parent)
, d(new Private(this))
{
}
FlattenTaskGroupsProxyModel::~FlattenTaskGroupsProxyModel()
{
}
void FlattenTaskGroupsProxyModel::setSourceModel(QAbstractItemModel *sourceModel)
{
d->sourceTasksModel = dynamic_cast<AbstractTasksModelIface *>(sourceModel);
KDescendantsProxyModel::setSourceModel(sourceModel);
}
QModelIndex FlattenTaskGroupsProxyModel::mapIfaceToSource(const QModelIndex &index) const
{
return mapToSource(index);
}
}