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
13
14class TreeViewDecoratorModel : public QSortFilterProxyModel
15{
17
18public Q_SLOTS:
19 void trackExpandedState( const QModelIndex &index );
20 void trackCollapsedState( const QModelIndex &index );
21
22public:
23 explicit TreeViewDecoratorModel( QObject *parent = nullptr );
24 QVariant data( const QModelIndex & proxyIndex, int role = Qt::DisplayRole ) const override;
25
26protected:
27 bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const override;
28
29private:
30 QList<QPersistentModelIndex> m_expandedRows;
31
32};
33
34}
35
36#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
T qobject_cast(QObject *object)
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 Tue Mar 26 2024 11:18:17 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.