digiKam
Loading...
Searching...
No Matches
gpsbookmarkmodelhelper.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 : 2009-11-21
7 * Description : Central object for managing bookmarks
8 *
9 * SPDX-FileCopyrightText: 2010-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2009-2010 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
22// Local includes
23
24#include "geomodelhelper.h"
25#include "gpsdatacontainer.h"
26#include "bookmarksmngr.h"
27#include "digikam_export.h"
28
29namespace Digikam
30{
31
32class GPSItemModel;
33class GPSUndoCommand;
34
35class DIGIKAM_EXPORT GPSBookmarkModelHelper : public GeoModelHelper
36{
37 Q_OBJECT
38
39public:
40
42 {
43 CoordinatesRole = Qt::UserRole + 1
44 };
45
46public:
47
48 GPSBookmarkModelHelper(BookmarksManager* const bookmarkManager,
49 GPSItemModel* const imageModel,
50 QObject* const parent = nullptr);
51 ~GPSBookmarkModelHelper() override;
52
53 void setVisible(const bool state);
54
55 QAbstractItemModel* model() const override;
56 QItemSelectionModel* selectionModel() const override;
57 bool itemCoordinates(const QModelIndex& index,
58 GeoCoordinates* const coordinates) const override;
59 bool itemIcon(const QModelIndex& index, QPoint* const offset,
60 QSize* const size, QPixmap* const pixmap,
61 QUrl* const url) const override;
62 PropertyFlags modelFlags() const override;
63 PropertyFlags itemFlags(const QModelIndex& index) const override;
64 void snapItemsTo(const QModelIndex& targetIndex,
65 const QList<QModelIndex>& snappedIndices) override;
66
67private Q_SLOTS:
68
69 void slotUpdateBookmarksModel();
70
71Q_SIGNALS:
72
74
75private:
76
77 class Private;
78 Private* const d = nullptr;
79};
80
81} // namespace Digikam
Definition bookmarksmngr.h:204
Definition gpsbookmarkmodelhelper.h:36
Constants
Definition gpsbookmarkmodelhelper.h:42
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