Marble

CylindricalProjection.h
Go to the documentation of this file.
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2007 Inge Wallin <[email protected]>
4 // SPDX-FileCopyrightText: 2007-2012 Torsten Rahn <[email protected]>
5 // SPDX-FileCopyrightText: 2012 Cezar Mocan <[email protected]>
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 
29 {
30  // Not a QObject so far because we don't need to send signals.
31  public:
32 
34 
35  ~CylindricalProjection() override;
36 
37  bool repeatableX() const override { return true; };
38 
39  bool traversablePoles() const override { return false; }
40  bool traversableDateLine() const override { return false; }
41 
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 
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 
bool repeatableX() const override
Returns whether the projection allows for wrapping in x direction (along the longitude scale).
A base class for all projections in Marble.
A base class for the Equirectangular and Mercator projections in Marble.
Binds a QML item to a specific geodetic location in screen coordinates.
QPainterPath mapShape(const ViewportParams *viewport) const override
Returns the shape/outline of a map projection.
bool screenCoordinates(const qreal lon, const qreal lat, const ViewportParams *viewport, qreal &x, qreal &y) const
Get the screen coordinates corresponding to geographical coordinates in the map.
bool traversablePoles() const override
Returns whether the projection allows to navigate seamlessly "over" the pole.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:18 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.