Marble

MapThemeSortFilterProxyModel.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2008 Claudiu Covaci <claudiu.covaci@gmail.com>
4// SPDX-FileCopyrightText: 2009 Torsten Rahn <tackat@kde.org>
5//
6
7#ifndef MARBLE_MAPTHEMESORTFILTERPROXYMODEL_H
8#define MARBLE_MAPTHEMESORTFILTERPROXYMODEL_H
9
10#include <QSortFilterProxyModel>
11
12class QDateTime;
13
14namespace Marble
15{
16
17class MapThemeSortFilterProxyModel : public QSortFilterProxyModel
18{
20
21public:
22 explicit MapThemeSortFilterProxyModel(QObject *parent = nullptr);
23
24protected:
25 bool lessThan(const QModelIndex &left, const QModelIndex &right) const override;
26 bool filterAcceptsRow(int sourceRow, const QModelIndex &sourceParent) const override;
27
28private:
29 static bool isFavorite(const QModelIndex &index);
30 static QDateTime favoriteDateTime(const QModelIndex &index);
31};
32
33}
34
35#endif
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
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 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.