Marble

GeoDataLookAt.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2009 Gaurav Gupta <1989.gaurav@googlemail.com>
4// SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de>
5//
6
7#ifndef MARBLE_GEODATALOOKAT_H
8#define MARBLE_GEODATALOOKAT_H
9
10#include "GeoDataAbstractView.h"
11#include "GeoDataCoordinates.h"
12#include "geodata_export.h"
13
14namespace Marble
15{
16class GeoDataLookAtPrivate;
17
18/**
19 */
20class GEODATA_EXPORT GeoDataLookAt : public GeoDataAbstractView
21{
22public:
23 GeoDataLookAt();
24
25 GeoDataLookAt(const GeoDataLookAt &other);
26
27 GeoDataLookAt &operator=(const GeoDataLookAt &other);
28
29 bool operator==(const GeoDataLookAt &other) const;
30 bool operator!=(const GeoDataLookAt &other) const;
31
32 ~GeoDataLookAt() override;
33
34 GeoDataAbstractView *copy() const override;
35
36 /**
37 * @brief set the altitude in a GeoDataLookAt object
38 * @param altitude latitude
39 *
40 */
41 void setAltitude(qreal altitude);
42
43 /**
44 * @brief retrieves the altitude of the GeoDataLookAt object
45 * @return latitude
46 */
47 qreal altitude() const;
48
49 /**
50 * @brief set the latitude in a GeoDataLookAt object
51 * @param latitude latitude
52 * @param unit units that lon and lat get measured in
53 * (default for Radian: north pole at pi/2, southpole at -pi/2)
54 */
55 void setLatitude(qreal latitude, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian);
56
57 /**
58 * @brief retrieves the latitude of the GeoDataLookAt object
59 * use the unit parameter to switch between Radian and DMS
60 * @param unit units that lon and lat get measured in
61 * (default for Radian: north pole at pi/2, southpole at -pi/2)
62 * @return latitude
63 */
64 qreal latitude(GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian) const;
65
66 /**
67 * @brief set the longitude in a GeoDataLookAt object
68 * @param longitude longitude
69 * @param unit units that lon and lat get measured in
70 * (default for Radian: north pole at pi/2, southpole at -pi/2)
71 */
72 void setLongitude(qreal longitude, GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian);
73
74 /**
75 * @brief retrieves the longitude of the GeoDataLookAt object
76 * use the unit parameter to switch between Radian and DMS
77 * @param unit units that lon and lat get measured in
78 * (default for Radian: north pole at pi/2, southpole at -pi/2)
79 * @return latitude
80 */
81 qreal longitude(GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian) const;
82
83 /**
84 * @brief retrieve the lat/lon/alt triple as a GeoDataCoordinates object
85 * @return GeoDataCoordinates
86 * @see longitude latitude altitude
87 */
88 GeoDataCoordinates coordinates() const;
89
90 /**
91 * @brief Change the distance (in meters) between the camera and the object looked at
92 * @see range
93 */
94 void setRange(qreal range);
95
96 /**
97 * @brief Retrieve the distance (in meters) between the camera and the object looked at
98 * @see setRange
99 */
100 qreal range() const;
101
102 /**
103 * @brief set the GeoDataCoordinates object
104 * @param coordinates GeoDataCoordinates
105 * @see GeoDataCoordinates
106 */
107 void setCoordinates(const GeoDataCoordinates &coordinates);
108
109 /// Provides type information for downcasting a GeoNode
110 const char *nodeType() const override;
111
112 void detach();
113
114private:
115 GeoDataLookAtPrivate *d;
116};
117}
118Q_DECLARE_METATYPE(Marble::GeoDataLookAt)
119#endif
KIOCORE_EXPORT bool operator!=(const UDSEntry &entry, const UDSEntry &other)
const QList< QKeySequence > & copy()
bool operator==(const StyleDelim &l, const StyleDelim &r)
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 Mon Nov 18 2024 12:15:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.