digiKam
Loading...
Searching...
No Matches
gpsiteminfosorter.h
Go to the documentation of this file.
1/* ============================================================
2 *
3 * This file is a part of digiKam project
4 * https://www.digikam.org
5 *
6 * Date : 2011-01-06
7 * Description : Helper class for geomap interaction
8 *
9 * SPDX-FileCopyrightText: 2011 by Michael G. Hansen <mike at mghansen dot de>
10 * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QDateTime>
21#include <QObject>
22#include <QSize>
23#include <QUrl>
24
25// Local includes
26
27#include "digikam_export.h"
28#include "geocoordinates.h"
29#include "geogroupstate.h"
30#include "gpsiteminfo.h"
31#include "mapwidget.h"
32
33namespace Digikam
34{
35
36class DIGIKAM_EXPORT GPSItemInfoSorter : public QObject
37{
38 Q_OBJECT
39
40public:
41
43 {
44 SortYoungestFirst = 0,
45 SortOldestFirst = 1,
46 SortRating = 2
47 };
48 Q_DECLARE_FLAGS(SortOptions, SortOption)
49
50public:
51
52 explicit GPSItemInfoSorter(QObject* const parent);
53 ~GPSItemInfoSorter() override;
54
55 void addToMapWidget(MapWidget* const mapWidget);
56
57 void setSortOptions(const SortOptions sortOptions);
58 SortOptions getSortOptions() const;
59
60public:
61
62 static bool fitsBetter(const GPSItemInfo& oldInfo,
63 const GeoGroupState oldState,
64 const GPSItemInfo& newInfo,
65 const GeoGroupState newState,
66 const GeoGroupState globalGroupState,
67 const SortOptions sortOptions);
68
69private Q_SLOTS:
70
71 void slotSortOptionTriggered();
72
73private:
74
75 void initializeSortMenu();
76
77private:
78
79 // Disable
80 GPSItemInfoSorter() = delete;
81
82private:
83
84 class Private;
85 Private* const d = nullptr;
86};
87
88} // namespace Digikam
89
90Q_DECLARE_OPERATORS_FOR_FLAGS(Digikam::GPSItemInfoSorter::SortOptions)
Definition gpsiteminfosorter.h:37
SortOption
Definition gpsiteminfosorter.h:43
Definition gpsiteminfo.h:33
The central map view class of geolocation interface.
Definition mapwidget.h:77
Definition datefolderview.cpp:34