digiKam
lookupaltitudegeonames.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 : 2011-04-30
7  * Description : Class for geonames.org based altitude lookup
8  *
9  * Copyright (C) 2010-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  * Copyright (C) 2010-2011 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_LOOKUP_ALTITUDE_GEONAMES_H
26 #define DIGIKAM_LOOKUP_ALTITUDE_GEONAMES_H
27 
28 // Qt includes
29 
30 #include <QNetworkReply>
31 
32 // Local includes
33 
34 #include "lookupaltitude.h"
35 #include "digikam_export.h"
36 
37 namespace Digikam
38 {
39 
40 class DIGIKAM_EXPORT LookupAltitudeGeonames : public LookupAltitude
41 {
42  Q_OBJECT
43 
44 public:
45 
46  explicit LookupAltitudeGeonames(QObject* const parent);
47  ~LookupAltitudeGeonames() override;
48 
49  QString backendName() const override;
50  QString backendHumanName() const override;
51 
52  void addRequests(const Request::List& requests) override;
53  Request::List getRequests() const override;
54  Request getRequest(const int index) const override;
55 
56  void startLookup() override;
57  StatusAltitude getStatus() const override;
58  QString errorMessage() const override;
59  void cancel() override;
60 
61 private Q_SLOTS:
62 
63  void slotFinished(QNetworkReply* reply);
64 
65 private:
66 
67  void startNextRequest();
68 
69 private:
70 
71  class Private;
72  const QScopedPointer<Private> d;
73 };
74 
75 } // namespace Digikam
76 
77 #endif // DIGIKAM_LOOKUP_ALTITUDE_GEONAMES_H
Definition: lookupaltitudegeonames.h:41
Definition: lookupaltitude.h:58
Definition: lookupaltitude.h:41
Definition: datefolderview.cpp:43