File indexing completed on 2025-01-05 03:58:56
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2013 Mayank Madan <maddiemadan@gmail.com> 0004 // 0005 0006 #ifndef GEODATALATLONQUAD_H 0007 #define GEODATALATLONQUAD_H 0008 0009 #include "GeoDataCoordinates.h" 0010 #include "GeoDataObject.h" 0011 #include "MarbleGlobal.h" 0012 0013 namespace Marble { 0014 0015 class GeoDataLatLonQuadPrivate; 0016 0017 /** 0018 */ 0019 class DIGIKAM_EXPORT GeoDataLatLonQuad: public GeoDataObject 0020 { 0021 public: 0022 GeoDataLatLonQuad(); 0023 0024 GeoDataLatLonQuad( const GeoDataLatLonQuad &other ); 0025 0026 GeoDataLatLonQuad& operator=( const GeoDataLatLonQuad &other ); 0027 bool operator==( const GeoDataLatLonQuad &other ) const; 0028 bool operator!=( const GeoDataLatLonQuad &other ) const; 0029 0030 ~GeoDataLatLonQuad() override; 0031 0032 /** Provides type information for downcasting a GeoNode */ 0033 const char* nodeType() const override; 0034 0035 qreal bottomLeftLatitude( GeoDataCoordinates::Unit unit ) const; 0036 qreal bottomRightLatitude( GeoDataCoordinates::Unit unit ) const; 0037 qreal topRightLatitude( GeoDataCoordinates::Unit unit ) const; 0038 qreal topLeftLatitude( GeoDataCoordinates::Unit unit ) const; 0039 0040 qreal bottomLeftLongitude( GeoDataCoordinates::Unit unit ) const; 0041 qreal bottomRightLongitude( GeoDataCoordinates::Unit unit ) const; 0042 qreal topRightLongitude( GeoDataCoordinates::Unit unit ) const; 0043 qreal topLeftLongitude( GeoDataCoordinates::Unit unit ) const; 0044 0045 void setBottomLeftLatitude( qreal latitude, GeoDataCoordinates::Unit unit ); 0046 void setBottomRightLatitude( qreal latitude, GeoDataCoordinates::Unit unit ); 0047 void setTopRightLatitude( qreal latitude, GeoDataCoordinates::Unit unit ); 0048 void setTopLeftLatitude( qreal latitude, GeoDataCoordinates::Unit unit ); 0049 0050 void setBottomLeftLongitude( qreal longitude, GeoDataCoordinates::Unit unit ); 0051 void setBottomRightLongitude( qreal longitude, GeoDataCoordinates::Unit unit ); 0052 void setTopRightLongitude( qreal longitude, GeoDataCoordinates::Unit unit ); 0053 void setTopLeftLongitude( qreal longitude, GeoDataCoordinates::Unit unit ); 0054 0055 GeoDataCoordinates& bottomLeft() const; 0056 void setBottomLeft( const GeoDataCoordinates &coordinates ); 0057 0058 GeoDataCoordinates& bottomRight() const; 0059 void setBottomRight( const GeoDataCoordinates &coordinates ); 0060 0061 GeoDataCoordinates& topRight() const; 0062 void setTopRight( const GeoDataCoordinates &coordinates ); 0063 0064 GeoDataCoordinates& topLeft() const; 0065 void setTopLeft( const GeoDataCoordinates &coordinates ); 0066 0067 bool isValid() const; 0068 0069 private: 0070 GeoDataLatLonQuadPrivate* const d; 0071 }; 0072 0073 } 0074 0075 #endif