Marble

TreeViewDecoratorModel.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2014 Levente Kurusa <levex@linux.com>
4
5#ifndef TREEVIEWDECORATORMODEL_H
6#define TREEVIEWDECORATORMODEL_H
7
8#include <QSortFilterProxyModel>
9
10namespace Marble
11{
12
13class TreeViewDecoratorModel : public QSortFilterProxyModel
14{
16
17public Q_SLOTS:
18 void trackExpandedState(const QModelIndex &index);
19 void trackCollapsedState(const QModelIndex &index);
20
21public:
22 explicit TreeViewDecoratorModel(QObject *parent = nullptr);
23 QVariant data(const QModelIndex &proxyIndex, int role = Qt::DisplayRole) const override;
24
25protected:
26 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
27
28private:
29 QList<QPersistentModelIndex> m_expandedRows;
30};
31
32}
33
34#endif // TREEVIEWDECORATORMODEL_H
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
Q_SLOTSQ_SLOTS
QObject * parent() const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
DisplayRole
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.