Marble

BranchFilterProxyModel.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <[email protected]>
4 // SPDX-FileCopyrightText: 2012 Thibaut Gridel <[email protected]>
5 
6 #ifndef BRANCHFILTERPROXYMODEL_H
7 #define BRANCHFILTERPROXYMODEL_H
8 
9 #include <QSortFilterProxyModel>
10 
11 namespace Marble
12 {
13 
14 class GeoDataTreeModel;
15 
16 class BranchFilterProxyModel : public QSortFilterProxyModel
17 {
18 public:
19  explicit BranchFilterProxyModel( QObject *parent = nullptr );
20 
21  void setBranchIndex( GeoDataTreeModel *sourceModel, const QModelIndex &index );
22 
23 protected:
24  bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const override;
25 
26 private:
27  GeoDataTreeModel *m_treeModel;
28  QPersistentModelIndex m_branchIndex;
29 
30 };
31 
32 }
33 
34 #endif // BRANCHFILTERPROXYMODEL_H
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 Thu Sep 21 2023 04:12:25 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.