Marble

MapThemeSortFilterProxyModel.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2008 Claudiu Covaci <[email protected]>
4 // SPDX-FileCopyrightText: 2009 Torsten Rahn <[email protected]>
5 //
6 
7 #ifndef MARBLE_MAPTHEMESORTFILTERPROXYMODEL_H
8 #define MARBLE_MAPTHEMESORTFILTERPROXYMODEL_H
9 
10 #include <QSortFilterProxyModel>
11 
12 class QDateTime;
13 
14 namespace Marble
15 {
16 
17 class MapThemeSortFilterProxyModel : public QSortFilterProxyModel
18 {
19  Q_OBJECT
20 
21 public:
22  explicit MapThemeSortFilterProxyModel(QObject *parent = nullptr);
23 
24 protected:
25  bool lessThan( const QModelIndex &left, const QModelIndex &right ) const override;
26  bool filterAcceptsRow( int sourceRow, const QModelIndex &sourceParent ) const override;
27 
28 private:
29  static bool isFavorite( const QModelIndex& index );
30  static QDateTime favoriteDateTime( const QModelIndex& index );
31 };
32 
33 }
34 
35 #endif
Q_OBJECTQ_OBJECT
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 Tue Oct 3 2023 04:09:48 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.