File indexing completed on 2025-01-05 03:59:32
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org> 0004 // SPDX-FileCopyrightText: 2007-2012 Torsten Rahn <rahn@kde.org> 0005 // SPDX-FileCopyrightText: 2012 Cezar Mocan <mocancezar@gmail.com> 0006 // 0007 0008 #ifndef MARBLE_CYLINDRICALPROJECTION_H 0009 #define MARBLE_CYLINDRICALPROJECTION_H 0010 0011 /** @file 0012 * This file contains the headers for CylindricalProjection. 0013 * 0014 */ 0015 0016 #include "AbstractProjection.h" 0017 0018 namespace Marble 0019 { 0020 0021 class CylindricalProjectionPrivate; 0022 class AbstractProjectionPrivate; 0023 0024 /** 0025 * @short A base class for the Equirectangular and Mercator projections in Marble 0026 */ 0027 0028 class CylindricalProjection : public AbstractProjection 0029 { 0030 // Not a QObject so far because we don't need to send signals. 0031 public: 0032 0033 CylindricalProjection(); 0034 0035 ~CylindricalProjection() override; 0036 0037 bool repeatableX() const override { return true; }; 0038 0039 bool traversablePoles() const override { return false; } 0040 bool traversableDateLine() const override { return false; } 0041 0042 SurfaceType surfaceType() const override { return Cylindrical; } 0043 0044 bool screenCoordinates( const GeoDataLineString &lineString, 0045 const ViewportParams *viewport, 0046 QVector<QPolygonF*> &polygons ) const override; 0047 0048 using AbstractProjection::screenCoordinates; 0049 0050 QPainterPath mapShape( const ViewportParams *viewport ) const override; 0051 0052 protected: 0053 explicit CylindricalProjection( CylindricalProjectionPrivate* dd ); 0054 0055 private: 0056 Q_DECLARE_PRIVATE( CylindricalProjection ) 0057 Q_DISABLE_COPY( CylindricalProjection ) 0058 }; 0059 0060 } 0061 0062 #endif 0063