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