Marble

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

KDE's Doxygen guidelines are available online.