digiKam
track_correlator.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-09-19
7  * Description : Correlator for tracks and images
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010 by Michael G. Hansen <mike at mghansen dot de>
11  *
12  * This program is free software; you can redistribute it
13  * and/or modify it under the terms of the GNU General
14  * Public License as published by the Free Software Foundation;
15  * either version 2, or (at your option)
16  * any later version.
17  *
18  * This program is distributed in the hope that it will be useful,
19  * but WITHOUT ANY WARRANTY; without even the implied warranty of
20  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21  * GNU General Public License for more details.
22  *
23  * ============================================================ */
24 
25 #ifndef DIGIKAM_TRACK_CORRELATOR_H
26 #define DIGIKAM_TRACK_CORRELATOR_H
27 
28 // Local includes
29 
30 #include "trackmanager.h"
31 #include "digikam_export.h"
32 
33 namespace Digikam
34 {
35 
36 class DIGIKAM_EXPORT TrackCorrelator : public QObject
37 {
38  Q_OBJECT
39 
40 public:
41 
43  {
44  CorrelationFlagCoordinates = 1,
45  CorrelationFlagInterpolated = 2,
46  CorrelationFlagAltitude = 3
47  };
48 
49 public:
50 
52  {
53  public:
54 
55  explicit Correlation()
56  : dateTime (),
57  userData (),
58  nSatellites(-1),
59  hDop (-1),
60  pDop (-1),
61  fixType (-1),
62  speed (-1),
63  flags (),
64  coordinates()
65  {
66  }
67 
68  public:
69 
71 
72  QDateTime dateTime;
73  QVariant userData;
75  qreal hDop;
76  qreal pDop;
77  int fixType;
78  qreal speed;
81  };
82 
83  // -------------------------------------
84 
86  {
87  public:
88 
89  explicit CorrelationOptions()
90  : interpolate (false),
91  interpolationDstTime(0),
92  maxGapTime (0),
93  secondsOffset (0),
94  timeZoneOffset (0)
95  {
96  }
97 
98  public:
99 
105  };
106 
107 public:
108 
109  explicit TrackCorrelator(TrackManager* const trackManager, QObject* const parent = nullptr);
110  ~TrackCorrelator() override;
111 
112  void correlate(const Correlation::List& itemsToCorrelate, const CorrelationOptions& options);
113  void cancelCorrelation();
114 
115 Q_SIGNALS:
116 
120 
121 private Q_SLOTS:
122 
123  void slotThreadItemsCorrelated(const Digikam::TrackCorrelator::Correlation::List& correlatedItems);
124  void slotThreadFinished();
125 
126 private:
127 
128  class Private;
129  const QScopedPointer<Private> d;
130 };
131 
132 } // namespace Digikam
133 
135 
136 #endif // DIGIKAM_TRACK_CORRELATOR_H
Definition: geocoordinates.h:49
Definition: track_correlator.h:86
int secondsOffset
Definition: track_correlator.h:103
CorrelationOptions()
Definition: track_correlator.h:89
int timeZoneOffset
Definition: track_correlator.h:104
bool interpolate
Definition: track_correlator.h:100
int interpolationDstTime
Definition: track_correlator.h:101
int maxGapTime
Definition: track_correlator.h:102
Definition: track_correlator.h:52
qreal pDop
Definition: track_correlator.h:76
qreal hDop
Definition: track_correlator.h:75
Correlation()
Definition: track_correlator.h:55
QVariant userData
Definition: track_correlator.h:73
int nSatellites
Definition: track_correlator.h:74
QDateTime dateTime
Definition: track_correlator.h:72
qreal speed
Definition: track_correlator.h:78
QList< Correlation > List
Definition: track_correlator.h:70
GeoCoordinates coordinates
Definition: track_correlator.h:80
CorrelationFlags flags
Definition: track_correlator.h:79
int fixType
Definition: track_correlator.h:77
Definition: track_correlator.h:37
void signalItemsCorrelated(const Digikam::TrackCorrelator::Correlation::List &correlatedItems)
CorrelationFlags
Definition: track_correlator.h:43
Definition: trackmanager.h:46
Definition: datefolderview.cpp:43