digiKam
Loading...
Searching...
No Matches
itemgpsmodelhelper.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 : 2010-07-15
7 * Description : Model for central Map view
8 *
9 * SPDX-FileCopyrightText: 2010 by Gabriel Voicu <ping dot gabi at gmail dot com>
10 * SPDX-FileCopyrightText: 2010-2011 by Michael G. Hansen <mike at mghansen dot de>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QObject>
21#include <QStandardItemModel>
22#include <QPixmap>
23
24// Local includes
25
26#include "geomodelhelper.h"
27#include "thumbnailloadthread.h"
28#include "gpsiteminfosorter.h"
29
30namespace Digikam
31{
32
33const int RoleGPSItemInfo = Qt::UserRole + 1;
34
36{
37 Q_OBJECT
38
39public:
40
41 explicit ItemGPSModelHelper(QStandardItemModel* const itemModel,
42 QObject* const parent = nullptr);
43 ~ItemGPSModelHelper() override;
44
45 QAbstractItemModel* model() const override;
46 QItemSelectionModel* selectionModel() const override;
47
48 bool itemCoordinates(const QModelIndex& index,
49 GeoCoordinates* const coordinates) const override;
50
51 QPixmap pixmapFromRepresentativeIndex(const QPersistentModelIndex& index,
52 const QSize& size) override;
53
54 QPersistentModelIndex bestRepresentativeIndexFromList(const QList<QPersistentModelIndex>& list,
55 const int sortKey) override;
56
57private Q_SLOTS:
58
59 void slotThumbnailLoaded(const LoadingDescription&, const QPixmap&);
60
61private:
62
63 class Private;
64 Private* const d = nullptr;
65};
66
67} // namespace Digikam
Definition geocoordinates.h:44
Helper class to access data in models.
Definition geomodelhelper.h:37
Definition itemgpsmodelhelper.h:36
QPixmap pixmapFromRepresentativeIndex(const QPersistentModelIndex &index, const QSize &size) override
these are used by MarkerModel for grouped models
Definition itemgpsmodelhelper.cpp:79
bool itemCoordinates(const QModelIndex &index, GeoCoordinates *const coordinates) const override
Definition itemgpsmodelhelper.cpp:63
QPersistentModelIndex bestRepresentativeIndexFromList(const QList< QPersistentModelIndex > &list, const int sortKey) override
Definition itemgpsmodelhelper.cpp:108
~ItemGPSModelHelper() override
Definition itemgpsmodelhelper.cpp:48
QAbstractItemModel * model() const override
these are necessary for grouped and ungrouped models
Definition itemgpsmodelhelper.cpp:53
QItemSelectionModel * selectionModel() const override
Definition itemgpsmodelhelper.cpp:58
Definition loadingdescription.h:35
Definition datefolderview.cpp:34
const int RoleGPSItemInfo
Definition itemgpsmodelhelper.h:33