Marble

LatLonEdit.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2008 Henry de Valence <hdevalence@gmail.com>
4// SPDX-FileCopyrightText: 2011 Friedrich W. H. Kossebau <kossebau@kde.org>
5
6#ifndef MARBLE_LATLONEDIT_H
7#define MARBLE_LATLONEDIT_H
8
9#include <QWidget>
10
11#include "GeoDataCoordinates.h"
12#include "MarbleGlobal.h"
13#include "marble_export.h"
14
15namespace Marble
16{
17
18class LatLonEditPrivate;
19
20class MARBLE_EXPORT LatLonEdit : public QWidget
21{
22 Q_OBJECT
23 //FIXME: make the dimension enum work
24 //Q_PROPERTY( qreal value READ value WRITE setValue )
25 //Q_PROPERTY( int dimension READ dimension WRITE setDimension )
26
27public:
28 /**
29 * @brief This enum is used to choose the dimension.
30 */
31 enum Dimension {
32 Latitude, ///< Latitude
33 Longitude ///< Longitude
34 };
35
36 explicit LatLonEdit(QWidget *parent = nullptr, Dimension dimension = Longitude,
37 GeoDataCoordinates::Notation notation = GeoDataCoordinates::DMS);
38 ~LatLonEdit() override;
39 qreal value() const;
40 Dimension dimension() const;
41 GeoDataCoordinates::Notation notation() const;
42public Q_SLOTS:
43 void setValue(qreal newvalue);
44 void setDimension( Dimension dimension );
45 void setNotation(GeoDataCoordinates::Notation notation);
46Q_SIGNALS:
47 void valueChanged( qreal value );
48private Q_SLOTS:
49 void checkIntValueOverflow();
50 void checkUIntValueOverflow();
51 void checkFloatValueOverflow();
52 void onSignChanged();
53private:
54 // recalculates m_value based on spinboxes
55 void recalculate();
56private:
57 LatLonEditPrivate * const d;
58};
59
60}
61
62#endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.