1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
4 // SPDX-FileCopyrightText: 2007-2012 Torsten Rahn <rahn@kde.org>
5 // SPDX-FileCopyrightText: 2012 Cezar Mocan <mocancezar@gmail.com>
6 //
7 
8 #ifndef MARBLE_CYLINDRICALPROJECTION_H
9 #define MARBLE_CYLINDRICALPROJECTION_H
10 
11 /** @file
12  * This file contains the headers for CylindricalProjection.
13  *
14  */
15 
16 #include "AbstractProjection.h"
17 
18 namespace Marble
19 {
20 
21 class CylindricalProjectionPrivate;
22 class AbstractProjectionPrivate;
23 
24 /**
25  * @short A base class for the Equirectangular and Mercator projections in Marble
26  */
27 
28 class CylindricalProjection : public AbstractProjection
29 {
30     // Not a QObject so far because we don't need to send signals.
31   public:
32 
33     CylindricalProjection();
34 
35     ~CylindricalProjection() override;
36 
repeatableX()37     bool repeatableX() const override { return true; };
38 
traversablePoles()39     bool traversablePoles()  const override { return false; }
traversableDateLine()40     bool traversableDateLine()  const override { return false; }
41 
surfaceType()42     SurfaceType surfaceType() const override { return Cylindrical; }
43 
44     bool screenCoordinates( const GeoDataLineString &lineString,
45                             const ViewportParams *viewport,
46                             QVector<QPolygonF*> &polygons ) const override;
47 
48     using AbstractProjection::screenCoordinates;
49 
50     QPainterPath mapShape( const ViewportParams *viewport ) const override;
51 
52  protected:
53     explicit CylindricalProjection( CylindricalProjectionPrivate* dd );
54 
55  private:
56     Q_DECLARE_PRIVATE( CylindricalProjection )
57     Q_DISABLE_COPY( CylindricalProjection )
58 };
59 
60 }
61 
62 #endif
63 
64