Marble

BranchFilterProxyModel.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4// SPDX-FileCopyrightText: 2012 Thibaut Gridel <tgridel@free.fr>
5
6#ifndef BRANCHFILTERPROXYMODEL_H
7#define BRANCHFILTERPROXYMODEL_H
8
9#include <QSortFilterProxyModel>
10
11namespace Marble
12{
13
14class GeoDataTreeModel;
15
16class BranchFilterProxyModel : public QSortFilterProxyModel
17{
18public:
19 explicit BranchFilterProxyModel(QObject *parent = nullptr);
20
21 void setBranchIndex(GeoDataTreeModel *sourceModel, const QModelIndex &index);
22
23protected:
24 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
25
26private:
27 GeoDataTreeModel *m_treeModel;
28 QPersistentModelIndex m_branchIndex;
29};
30
31}
32
33#endif // BRANCHFILTERPROXYMODEL_H
Binds a QML item to a specific geodetic location in screen coordinates.
QObject * parent() const const
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const const override
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:42 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.