digiKam
Loading...
Searching...
No Matches
gpsgeoifacemodelhelper.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 : 2006-05-16
7 * Description : A tool to edit geolocation
8 *
9 * SPDX-FileCopyrightText: 2006-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2010-2014 by Michael G. Hansen <mike at mghansen dot de>
11 * SPDX-FileCopyrightText: 2010 by Gabriel Voicu <ping dot gabi at gmail dot com>
12 * SPDX-FileCopyrightText: 2014 by Justus Schwartz <justus at gmx dot li>
13 *
14 * SPDX-License-Identifier: GPL-2.0-or-later
15 *
16 * ============================================================ */
17
18#pragma once
19
20// Qt includes
21
22#include <QModelIndex>
23
24// Local includes
25
26#include "geomodelhelper.h"
27#include "digikam_export.h"
28
29namespace Digikam
30{
31
32class GPSItemModel;
33class GPSUndoCommand;
34class MapWidget;
35
36class DIGIKAM_EXPORT GPSGeoIfaceModelHelper : public GeoModelHelper
37{
38 Q_OBJECT
39
40public:
41
42 explicit GPSGeoIfaceModelHelper(GPSItemModel* const model,
43 QItemSelectionModel* const selectionModel,
44 QObject* const parent = nullptr);
45 ~GPSGeoIfaceModelHelper() override;
46
47 QAbstractItemModel* model() const override;
48 QItemSelectionModel* selectionModel() const override;
49
50 bool itemCoordinates(const QModelIndex& index,
51 GeoCoordinates* const coordinates) const override;
52
53 PropertyFlags modelFlags() const override;
54
55 QPixmap pixmapFromRepresentativeIndex(const QPersistentModelIndex& index,
56 const QSize& size) override;
57
58 QPersistentModelIndex bestRepresentativeIndexFromList(const QList<QPersistentModelIndex>& list,
59 const int sortKey) override;
60
61 void onIndicesMoved(const QList<QPersistentModelIndex>& movedMarkers,
62 const GeoCoordinates& targetCoordinates,
63 const QPersistentModelIndex& targetSnapIndex) override;
64
65 void addUngroupedModelHelper(GeoModelHelper* const newModelHelper);
66
67private Q_SLOTS:
68
69 void slotThumbnailFromModel(const QPersistentModelIndex& index,
70 const QPixmap& pixmap);
71
72Q_SIGNALS:
73
75
76private:
77
78 class Private;
79 Private* const d = nullptr;
80};
81
82} // namespace Digikam
Definition gpsgeoifacemodelhelper.h:37
void signalUndoCommand(GPSUndoCommand *undoCommand)
Definition gpsitemmodel.h:33
Definition gpsundocommand.h:31
Definition geocoordinates.h:44
Helper class to access data in models.
Definition geomodelhelper.h:37
Definition datefolderview.cpp:34