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 COORDINATESDIALOG_H 0006 #define COORDINATESDIALOG_H 0007 0008 // Local includes 0009 #include "KGeoTag.h" 0010 #include "Coordinates.h" 0011 0012 // Qt includes 0013 #include <QDialog> 0014 0015 // Qt classes 0016 class QLineEdit; 0017 class QDoubleSpinBox; 0018 0019 class CoordinatesDialog : public QDialog 0020 { 0021 Q_OBJECT 0022 0023 public: 0024 enum Mode { 0025 ManualBookmark, 0026 EditCoordinates 0027 }; 0028 0029 explicit CoordinatesDialog(Mode mode, bool hideAlt, 0030 const Coordinates &coordinates = Coordinates(), 0031 const QString &target = QString()); 0032 QString label() const; 0033 double lon() const; 0034 double lat() const; 0035 double alt() const; 0036 Coordinates coordinates() const; 0037 0038 private: // Variables 0039 QLineEdit *m_label; 0040 QDoubleSpinBox *m_lon; 0041 QDoubleSpinBox *m_lat; 0042 QDoubleSpinBox *m_alt; 0043 0044 }; 0045 0046 #endif // COORDINATESDIALOG_H