Plasma5Support

placesproxymodel.h
1/*
2 SPDX-FileCopyrightText: 2014 Marco Martin <mart@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.1-or-later
5*/
6
7#pragma once
8
9#include <KFilePlacesModel>
10#include <QIdentityProxyModel>
11
12class PlacesProxyModel : public QIdentityProxyModel
13{
15
16public:
17 enum Roles {
19 IsDeviceRole,
20 PathRole,
21 SizeRole,
22 UsedRole,
23 AvailableRole,
24 };
25
26 PlacesProxyModel(QObject *parent, KFilePlacesModel *model);
27
28 QHash<int, QByteArray> roleNames() const override;
29 QVariant data(const QModelIndex &index, int role) const override;
30
31private:
32 KFilePlacesModel *m_placesModel;
33};
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
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:08:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.