digiKam
gpscorrelatorwidget.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-03-26
7  * Description : A widget to configure the GPS correlation
8  *
9  * Copyright (C) 2010-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) 2014 by Justus Schwartz <justus at gmx dot li>
12  *
13  * This program is free software; you can redistribute it
14  * and/or modify it under the terms of the GNU General
15  * Public License as published by the Free Software Foundation;
16  * either version 2, or (at your option)
17  * any later version.
18  *
19  * This program is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22  * GNU General Public License for more details.
23  *
24  * ============================================================ */
25 
26 #ifndef DIGIKAM_GPS_CORRELATOR_WIDGET_H
27 #define DIGIKAM_GPS_CORRELATOR_WIDGET_H
28 
29 // Qt includes
30 
31 #include <QUrl>
32 #include <QWidget>
33 
34 // local includes
35 
36 #include "track_correlator.h"
37 #include "digikam_export.h"
38 
39 class KConfigGroup;
40 
41 namespace Digikam
42 {
43 
44 class GPSItemModel;
45 class GPSUndoCommand;
46 
47 class DIGIKAM_EXPORT GPSCorrelatorWidget : public QWidget
48 {
49  Q_OBJECT
50 
51 public:
52 
53  explicit GPSCorrelatorWidget(QWidget* const parent,
54  GPSItemModel* const imageModel,
55  TrackManager* const trackManager);
56  ~GPSCorrelatorWidget() override;
57 
58  void setUIEnabledExternal(const bool state);
59  void saveSettingsToGroup(KConfigGroup* const group);
60  void readSettingsFromGroup(const KConfigGroup* const group);
61  QList<GeoCoordinates::List> getTrackCoordinates() const;
62  bool getShowTracksOnMap() const;
63 
64 protected:
65 
66  void setUIEnabledInternal(const bool state);
67 
68 Q_SIGNALS:
69 
70  void signalSetUIEnabled(const bool enabledState);
71  void signalSetUIEnabled(const bool enabledState, QObject* const cancelObject, const QString& cancelSlot);
72  void signalProgressSetup(const int maxProgress, const QString& progressText);
73  void signalProgressChanged(const int currentProgress);
74  void signalUndoCommand(GPSUndoCommand* undoCommand);
77 
78 public Q_SLOTS:
79 
80  void slotCancelCorrelation();
81 
82 private Q_SLOTS:
83 
84  void updateUIState();
85  void slotLoadTrackFiles();
86  void slotAllTrackFilesReady();
87  void slotCorrelate();
88  void slotItemsCorrelated(const Digikam::TrackCorrelator::Correlation::List& correlatedItems);
89  void slotAllItemsCorrelated();
90  void slotCorrelationCanceled();
91  void slotShowTracksStateChanged(int state);
92  void slotCurrentChanged(const QModelIndex& current, const QModelIndex& previous);
93 
94 private:
95 
96  class Private;
97  const QScopedPointer<Private> d;
98 };
99 
100 } // namespace Digikam
101 
102 #endif // DIGIKAM_GPS_CORRELATOR_WIDGET_H
Definition: gpscorrelatorwidget.h:48
void signalSetUIEnabled(const bool enabledState, QObject *const cancelObject, const QString &cancelSlot)
void signalSetUIEnabled(const bool enabledState)
void signalProgressSetup(const int maxProgress, const QString &progressText)
void signalTrackListChanged(const Digikam::GeoCoordinates &coordinate)
void signalUndoCommand(GPSUndoCommand *undoCommand)
void signalProgressChanged(const int currentProgress)
Definition: gpsitemmodel.h:43
Definition: gpsundocommand.h:41
Definition: geocoordinates.h:49
Definition: trackmanager.h:46
Definition: piwigotalker.h:48
Definition: datefolderview.cpp:43