File indexing completed on 2025-01-05 03:58:57
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2009 Gaurav Gupta <1989.gaurav@googlemail.com> 0004 // SPDX-FileCopyrightText: 2010 Bastian Holst <bastianholst@gmx.de> 0005 // 0006 0007 #ifndef MARBLE_GEODATALOOKAT_H 0008 #define MARBLE_GEODATALOOKAT_H 0009 0010 #include "digikam_export.h" 0011 #include "GeoDataAbstractView.h" 0012 #include "GeoDataCoordinates.h" 0013 0014 namespace Marble 0015 { 0016 class GeoDataLookAtPrivate; 0017 0018 /** 0019 */ 0020 class DIGIKAM_EXPORT GeoDataLookAt : public GeoDataAbstractView 0021 { 0022 public: 0023 GeoDataLookAt(); 0024 0025 GeoDataLookAt(const GeoDataLookAt& other); 0026 0027 GeoDataLookAt& operator=(const GeoDataLookAt &other); 0028 0029 bool operator==(const GeoDataLookAt &other) const; 0030 bool operator!=(const GeoDataLookAt &other) const; 0031 0032 ~GeoDataLookAt() override; 0033 0034 GeoDataAbstractView *copy() const override; 0035 0036 /** 0037 * @brief set the altitude in a GeoDataLookAt object 0038 * @param altitude latitude 0039 * 0040 */ 0041 void setAltitude( qreal altitude); 0042 0043 /** 0044 * @brief retrieves the altitude of the GeoDataLookAt object 0045 * @return latitude 0046 */ 0047 qreal altitude( ) const; 0048 0049 /** 0050 * @brief set the latitude in a GeoDataLookAt object 0051 * @param latitude latitude 0052 * @param unit units that lon and lat get measured in 0053 * (default for Radian: north pole at pi/2, southpole at -pi/2) 0054 */ 0055 void setLatitude( qreal latitude,GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ); 0056 0057 /** 0058 * @brief retrieves the latitude of the GeoDataLookAt object 0059 * use the unit parameter to switch between Radian and DMS 0060 * @param unit units that lon and lat get measured in 0061 * (default for Radian: north pole at pi/2, southpole at -pi/2) 0062 * @return latitude 0063 */ 0064 qreal latitude( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const; 0065 0066 /** 0067 * @brief set the longitude in a GeoDataLookAt object 0068 * @param longitude longitude 0069 * @param unit units that lon and lat get measured in 0070 * (default for Radian: north pole at pi/2, southpole at -pi/2) 0071 */ 0072 void setLongitude( qreal longitude,GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ); 0073 0074 /** 0075 * @brief retrieves the longitude of the GeoDataLookAt object 0076 * use the unit parameter to switch between Radian and DMS 0077 * @param unit units that lon and lat get measured in 0078 * (default for Radian: north pole at pi/2, southpole at -pi/2) 0079 * @return latitude 0080 */ 0081 qreal longitude( GeoDataCoordinates::Unit unit = GeoDataCoordinates::Radian ) const; 0082 0083 /** 0084 * @brief retrieve the lat/lon/alt triple as a GeoDataCoordinates object 0085 * @return GeoDataCoordinates 0086 * @see longitude latitude altitude 0087 */ 0088 GeoDataCoordinates coordinates() const; 0089 0090 /** 0091 * @brief Change the distance (in meters) between the camera and the object looked at 0092 * @see range 0093 */ 0094 void setRange( qreal range ); 0095 0096 /** 0097 * @brief Retrieve the distance (in meters) between the camera and the object looked at 0098 * @see setRange 0099 */ 0100 qreal range() const; 0101 0102 /** 0103 * @brief set the GeoDataCoordinates object 0104 * @param coordinates GeoDataCoordinates 0105 * @see GeoDataCoordinates 0106 */ 0107 void setCoordinates( const GeoDataCoordinates& coordinates ); 0108 0109 /// Provides type information for downcasting a GeoNode 0110 const char* nodeType() const override; 0111 0112 void detach(); 0113 private: 0114 GeoDataLookAtPrivate *d; 0115 0116 }; 0117 } 0118 Q_DECLARE_METATYPE( Marble::GeoDataLookAt ) 0119 #endif