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 <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
18namespace Marble
19{
20
21class CylindricalProjectionPrivate;
22class 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.
31public:
33
34 ~CylindricalProjection() override;
35
36 bool repeatableX() const override
37 {
38 return true;
39 };
40
41 bool traversablePoles() const override
42 {
43 return false;
44 }
45 bool traversableDateLine() const override
46 {
47 return false;
48 }
49
50 SurfaceType surfaceType() const override
51 {
52 return Cylindrical;
53 }
54
55 bool screenCoordinates(const GeoDataLineString &lineString, const ViewportParams *viewport, QList<QPolygonF *> &polygons) const override;
56
58
59 QPainterPath mapShape(const ViewportParams *viewport) const override;
60
61protected:
62 explicit CylindricalProjection(CylindricalProjectionPrivate *dd);
63
64private:
65 Q_DECLARE_PRIVATE(CylindricalProjection)
66 Q_DISABLE_COPY(CylindricalProjection)
67};
68
69}
70
71#endif
This file contains the headers for AbstractProjection.
A base class for all projections in Marble.
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.
A base class for the Equirectangular and Mercator projections in Marble.
bool traversablePoles() const override
Returns whether the projection allows to navigate seamlessly "over" the pole.
bool repeatableX() const override
Returns whether the projection allows for wrapping in x direction (along the longitude scale).
QPainterPath mapShape(const ViewportParams *viewport) const override
Returns the shape/outline of a map projection.
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:44 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.