KPkPass

location.h
1 /*
2  SPDX-FileCopyrightText: 2018 Volker Krause <[email protected]>
3 
4  SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6 
7 #ifndef KPKPASS_LOCATION_H
8 #define KPKPASS_LOCATION_H
9 
10 #include "kpkpass_export.h"
11 
12 #include <QMetaType>
13 
14 #include <memory>
15 
16 class QJsonObject;
17 
18 namespace KPkPass {
19 
20 class LocationPrivate;
21 
25 class KPKPASS_EXPORT Location
26 {
27  Q_GADGET
28  Q_PROPERTY(double altitude READ altitude CONSTANT)
29  Q_PROPERTY(double latitude READ latitude CONSTANT)
30  Q_PROPERTY(double longitude READ longitude CONSTANT)
31  Q_PROPERTY(QString relevantText READ relevantText CONSTANT)
32 public:
33  Location();
34  ~Location();
35 
37  Q_REQUIRED_RESULT double altitude() const;
39  Q_REQUIRED_RESULT double latitude() const;
41  Q_REQUIRED_RESULT double longitude() const;
43  Q_REQUIRED_RESULT QString relevantText() const;
44 private:
45  friend class Pass;
46  explicit Location(const QJsonObject &obj);
47  std::shared_ptr<LocationPrivate> d;
48 };
49 
50 }
51 
52 Q_DECLARE_METATYPE(KPkPass::Location)
53 
54 #endif // KPKPASS_LOCATION_H
A pass location element.
Definition: location.h:25
Base class for a pkpass file.
Definition: pass.h:35
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Jul 5 2020 23:16:10 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.