File indexing completed on 2024-04-28 15:39:05
0001 // SPDX-FileCopyrightText: 2020 Tobias Leupold <tl at stonemx dot de> 0002 // 0003 // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0004 0005 #ifndef COORDINATES_H 0006 #define COORDINATES_H 0007 0008 // Qt includes 0009 #include <QMetaType> 0010 #include <QDebug> 0011 0012 class Coordinates 0013 { 0014 0015 public: 0016 explicit Coordinates(); 0017 explicit Coordinates(double lon, double lat, double alt, bool isSet); 0018 double lon() const; 0019 double lat() const; 0020 void setAlt(double alt); 0021 double alt() const; 0022 bool isSet() const; 0023 bool operator==(const Coordinates &other) const; 0024 bool operator!=(const Coordinates &other) const; 0025 0026 private: // Variables 0027 double m_lon = 0.0; 0028 double m_lat = 0.0; 0029 double m_alt = 0.0; 0030 bool m_isSet = false; 0031 0032 }; 0033 0034 QDebug operator<<(QDebug debug, const Coordinates &coordinates); 0035 0036 Q_DECLARE_METATYPE(Coordinates) 0037 0038 #endif // COORDINATES_H