digiKam
geolocationedit.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  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010-2014 by Michael G. Hansen <mike at mghansen dot de>
11  * Copyright (C) 2010 by Gabriel Voicu <ping dot gabi at gmail dot com>
12  * Copyright (C) 2014 by Justus Schwartz <justus at gmx dot li>
13  *
14  * This program is free software; you can redistribute it
15  * and/or modify it under the terms of the GNU General
16  * Public License as published by the Free Software Foundation;
17  * either version 2, or (at your option)
18  * any later version.
19  *
20  * This program is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23  * GNU General Public License for more details.
24  *
25  * ============================================================ */
26 
27 #ifndef DIGIKAM_GEO_LOCATION_EDIT_H
28 #define DIGIKAM_GEO_LOCATION_EDIT_H
29 
30 // Qt includes
31 
32 #include <QModelIndex>
33 #include <QWidget>
34 #include <QUrl>
35 
36 // Local includes
37 
38 #include "dplugindialog.h"
39 #include "geoifacetypes.h"
40 #include "geomodelhelper.h"
41 #include "trackmanager.h"
42 #include "gpsitemcontainer.h"
43 #include "dinfointerface.h"
44 #include "mapwidget.h"
45 #include "gpsundocommand.h"
46 
47 class QAbstractItemModel;
48 
49 using namespace Digikam;
50 
52 {
53 
55 {
56  Q_OBJECT
57 
58 public:
59 
60  explicit GeolocationEdit(QWidget* const parent, DInfoInterface* const iface);
61  ~GeolocationEdit() override;
62 
66  void setImages(const QList<QUrl>& images);
67 
71  void setItems(const QList<GPSItemContainer*>& items);
72 
73 Q_SIGNALS:
74 
75  void signalMetadataChangedForUrl(const QUrl&);
76 
77 protected:
78 
79  void reject() override;
80  void closeEvent(QCloseEvent* e) override;
81  bool eventFilter(QObject*, QEvent*) override;
82 
83 private:
84 
85  void readSettings();
86  void saveSettings();
87  void saveChanges(const bool closeAfterwards);
88  MapWidget* makeMapWidget(QWidget** const pvbox);
89  void adjustMapLayout(const bool syncSettings);
90 
91 private Q_SLOTS:
92 
93  void slotImageActivated(const QModelIndex& index);
94  void slotSetUIEnabled(const bool enabledState, QObject* const cancelObject, const QString& cancelSlot);
95  void slotSetUIEnabled(const bool enabledState);
96  void slotApplyClicked();
97  void slotFileChangesSaved(int beginIndex, int endIndex);
98  void slotFileMetadataLoaded(int beginIndex, int endIndex);
99  void slotProgressChanged(const int currentProgress);
100  void slotProgressSetup(const int maxProgress, const QString& progressText);
101  void slotGPSUndoCommand(GPSUndoCommand* undoCommand);
102  void slotSortOptionTriggered(QAction* sortAction);
103  void setCurrentTab(const int index);
104  void slotProgressCancelButtonClicked();
105  void slotCurrentTabChanged(int);
106  void slotBookmarkVisibilityToggled();
107  void slotLayoutChanged(int);
108  void slotTrackListChanged(const Digikam::GeoCoordinates& coordinate);
109 
110 private:
111 
112  class Private;
113  Private* const d;
114 };
115 
116 } // namespace DigikamGenericGeolocationEditPlugin
117 
118 #endif // DIGIKAM_GEO_LOCATION_EDIT_H
Definition: dinfointerface.h:56
Definition: dplugindialog.h:42
Definition: gpsundocommand.h:41
Definition: geocoordinates.h:49
The central map view class of geolocation interface.
Definition: mapwidget.h:58
Definition: geolocationedit.cpp:97
Definition: datefolderview.cpp:43