1 /* SPDX-FileCopyrightText: 2020 Tobias Leupold <tobias.leupold@gmx.de> 2 3 SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-KDE-Accepted-GPL 4 */ 5 6 #ifndef COORDINATES_H 7 #define COORDINATES_H 8 9 // Qt includes 10 #include <QMetaType> 11 #include <QDebug> 12 13 class Coordinates 14 { 15 16 public: 17 explicit Coordinates(); 18 explicit Coordinates(double lon, double lat, double alt, bool isSet); 19 double lon() const; 20 double lat() const; 21 void setAlt(double alt); 22 double alt() const; 23 bool isSet() const; 24 bool operator==(const Coordinates &other) const; 25 bool operator!=(const Coordinates &other) const; 26 27 private: // Variables 28 double m_lon = 0.0; 29 double m_lat = 0.0; 30 double m_alt = 0.0; 31 bool m_isSet = false; 32 33 }; 34 35 QDebug operator<<(QDebug debug, const Coordinates &coordinates); 36 37 Q_DECLARE_METATYPE(Coordinates) 38 39 #endif // COORDINATES_H 40