Marble::ViewportParams
#include <ViewportParams.h>
Public Member Functions | |
ViewportParams (Projection projection, qreal centerLongitude=0, qreal centerLatitude=0, int radius=2000, const QSize &size=QSize(100, 100)) | |
qreal | angularResolution () const |
qreal | centerLatitude () const |
qreal | centerLongitude () const |
void | centerOn (qreal lon, qreal lat) |
const AbstractProjection * | currentProjection () const |
GeoDataCoordinates | focusPoint () const |
bool | geoCoordinates (const int x, const int y, qreal &lon, qreal &lat, GeoDataCoordinates::Unit unit=GeoDataCoordinates::Degree) const |
qreal | heading () const |
int | height () const |
GeoDataLatLonAltBox | latLonAltBox (const QRect &screenRect) const |
bool | mapCoversViewport () const |
QRegion | mapRegion () const |
QPainterPath | mapShape () const |
Quaternion | planetAxis () const |
const matrix & | planetAxisMatrix () const |
int | polarity () const |
Projection | projection () const |
int | radius () const |
void | resetFocusPoint () |
bool | resolves (const GeoDataCoordinates &coord1, const GeoDataCoordinates &coord2) const |
bool | resolves (const GeoDataLatLonAltBox &latLonAltBox, qreal pixel=2.0, qreal altitude=10000.0) const |
bool | resolves (const GeoDataLatLonBox &latLonBox, qreal pixel=2.0) const |
bool | screenCoordinates (const GeoDataCoordinates &coordinates, qreal *x, qreal &y, int &pointRepeatNum, const QSizeF &size, bool &globeHidesPoint) const |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, qreal &x, qreal &y) const |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, qreal &x, qreal &y, bool &globeHidesPoint) const |
bool | screenCoordinates (const GeoDataLineString &lineString, QList< QPolygonF * > &polygons) const |
bool | screenCoordinates (const qreal lon, const qreal lat, qreal &x, qreal &y) const |
void | setFocusPoint (const GeoDataCoordinates &focusPoint) |
void | setHeading (qreal heading) |
void | setHeight (int newHeight) |
void | setProjection (Projection newProjection) |
void | setRadius (int radius) |
void | setSize (const QSize &newSize) |
void | setWidth (int newWidth) |
QSize | size () const |
const GeoDataLatLonAltBox & | viewLatLonAltBox () const |
int | width () const |
Detailed Description
A public class that controls what is visible in the viewport of a Marble map.
Definition at line 40 of file ViewportParams.h.
Constructor & Destructor Documentation
◆ ViewportParams() [1/2]
Marble::ViewportParams::ViewportParams | ( | ) |
Definition at line 116 of file ViewportParams.cpp.
◆ ViewportParams() [2/2]
|
explicit |
Definition at line 122 of file ViewportParams.cpp.
◆ ~ViewportParams()
Marble::ViewportParams::~ViewportParams | ( | ) |
Definition at line 128 of file ViewportParams.cpp.
Member Function Documentation
◆ angularResolution()
qreal Marble::ViewportParams::angularResolution | ( | ) | const |
Definition at line 345 of file ViewportParams.cpp.
◆ centerLatitude()
qreal Marble::ViewportParams::centerLatitude | ( | ) | const |
Definition at line 325 of file ViewportParams.cpp.
◆ centerLongitude()
qreal Marble::ViewportParams::centerLongitude | ( | ) | const |
Definition at line 320 of file ViewportParams.cpp.
◆ centerOn()
void Marble::ViewportParams::centerOn | ( | qreal | lon, |
qreal | lat ) |
Definition at line 214 of file ViewportParams.cpp.
◆ currentProjection()
const AbstractProjection * Marble::ViewportParams::currentProjection | ( | ) | const |
Definition at line 141 of file ViewportParams.cpp.
◆ focusPoint()
GeoDataCoordinates Marble::ViewportParams::focusPoint | ( | ) | const |
- Returns
- The current point of focus, e.g. the point that is not moved when changing the zoom level. If not set, it defaults to the center point.
- See also
- centerCoordinates setFocusPoint resetFocusPoint
Definition at line 425 of file ViewportParams.cpp.
◆ geoCoordinates()
bool Marble::ViewportParams::geoCoordinates | ( | const int | x, |
const int | y, | ||
qreal & | lon, | ||
qreal & | lat, | ||
GeoDataCoordinates::Unit | unit = GeoDataCoordinates::Degree ) const |
Get the earth coordinates corresponding to a pixel in the map.
- Parameters
-
x the x coordinate of the pixel y the y coordinate of the pixel lon the longitude angle is returned through this parameter lat the latitude angle is returned through this parameter unit the unit of the angles for lon and lat.
- Returns
true
if the pixel (x, y) is within the globefalse
if the pixel (x, y) is outside the globe, i.e. in space.
Definition at line 405 of file ViewportParams.cpp.
◆ heading()
qreal Marble::ViewportParams::heading | ( | ) | const |
Definition at line 267 of file ViewportParams.cpp.
◆ height()
int Marble::ViewportParams::height | ( | ) | const |
Definition at line 287 of file ViewportParams.cpp.
◆ latLonAltBox()
GeoDataLatLonAltBox Marble::ViewportParams::latLonAltBox | ( | const QRect & | screenRect | ) | const |
Definition at line 340 of file ViewportParams.cpp.
◆ mapCoversViewport()
bool Marble::ViewportParams::mapCoversViewport | ( | ) | const |
Definition at line 410 of file ViewportParams.cpp.
◆ mapRegion()
QRegion Marble::ViewportParams::mapRegion | ( | ) | const |
Definition at line 420 of file ViewportParams.cpp.
◆ mapShape()
QPainterPath Marble::ViewportParams::mapShape | ( | ) | const |
Definition at line 415 of file ViewportParams.cpp.
◆ planetAxis()
Quaternion Marble::ViewportParams::planetAxis | ( | ) | const |
Definition at line 272 of file ViewportParams.cpp.
◆ planetAxisMatrix()
const matrix & Marble::ViewportParams::planetAxisMatrix | ( | ) | const |
Definition at line 277 of file ViewportParams.cpp.
◆ polarity()
int Marble::ViewportParams::polarity | ( | ) | const |
Definition at line 157 of file ViewportParams.cpp.
◆ projection()
Projection Marble::ViewportParams::projection | ( | ) | const |
Definition at line 136 of file ViewportParams.cpp.
◆ radius()
int Marble::ViewportParams::radius | ( | ) | const |
Definition at line 199 of file ViewportParams.cpp.
◆ resetFocusPoint()
void Marble::ViewportParams::resetFocusPoint | ( | ) |
Invalidate any focus point set with setFocusPoint.
- See also
- focusPoint setFocusPoint
Definition at line 442 of file ViewportParams.cpp.
◆ resolves() [1/3]
bool Marble::ViewportParams::resolves | ( | const GeoDataCoordinates & | coord1, |
const GeoDataCoordinates & | coord2 ) const |
Definition at line 363 of file ViewportParams.cpp.
◆ resolves() [2/3]
bool Marble::ViewportParams::resolves | ( | const GeoDataLatLonAltBox & | latLonAltBox, |
qreal | pixel = 2.0, | ||
qreal | altitude = 10000.0 ) const |
Definition at line 358 of file ViewportParams.cpp.
◆ resolves() [3/3]
bool Marble::ViewportParams::resolves | ( | const GeoDataLatLonBox & | latLonBox, |
qreal | pixel = 2.0 ) const |
Definition at line 353 of file ViewportParams.cpp.
◆ screenCoordinates() [1/5]
bool Marble::ViewportParams::screenCoordinates | ( | const GeoDataCoordinates & | coordinates, |
qreal * | x, | ||
qreal & | y, | ||
int & | pointRepeatNum, | ||
const QSizeF & | size, | ||
bool & | globeHidesPoint ) const |
Get the coordinates of screen points for geographical coordinates in the map.
- Parameters
-
coordinates the point on earth, including altitude, that we want the coordinates for. x the x coordinates of the pixels are returned through this parameter y the y coordinate of the pixel is returned through this parameter pointRepeatNum the amount of times that a single geographical point gets represented on the map size the size of the point globeHidesPoint whether the point gets hidden on the far side of the earth
- Returns
true
if the geographical coordinates are visible on the screenfalse
if the geographical coordinates are not visible on the screen
- See also
- ViewportParams
Definition at line 390 of file ViewportParams.cpp.
◆ screenCoordinates() [2/5]
bool Marble::ViewportParams::screenCoordinates | ( | const GeoDataCoordinates & | geopoint, |
qreal & | x, | ||
qreal & | y ) const |
Definition at line 385 of file ViewportParams.cpp.
◆ screenCoordinates() [3/5]
bool Marble::ViewportParams::screenCoordinates | ( | const GeoDataCoordinates & | geopoint, |
qreal & | x, | ||
qreal & | y, | ||
bool & | globeHidesPoint ) const |
Get the screen coordinates corresponding to geographical coordinates in the map.
- Parameters
-
geopoint the point on earth, including altitude, that we want the coordinates for. x the x coordinate of the pixel is returned through this parameter y the y coordinate of the pixel is returned through this parameter globeHidesPoint whether the point gets hidden on the far side of the earth
- Returns
true
if the geographical coordinates are visible on the screenfalse
if the geographical coordinates are not visible on the screen
- See also
- ViewportParams
Definition at line 380 of file ViewportParams.cpp.
◆ screenCoordinates() [4/5]
bool Marble::ViewportParams::screenCoordinates | ( | const GeoDataLineString & | lineString, |
QList< QPolygonF * > & | polygons ) const |
Definition at line 400 of file ViewportParams.cpp.
◆ screenCoordinates() [5/5]
bool Marble::ViewportParams::screenCoordinates | ( | const qreal | lon, |
const qreal | lat, | ||
qreal & | x, | ||
qreal & | y ) const |
Get the screen coordinates corresponding to geographical coordinates in the map.
- Parameters
-
lon the lon coordinate of the requested pixel position in radians lat the lat coordinate of the requested pixel position in radians x the x coordinate of the pixel is returned through this parameter y the y coordinate of the pixel is returned through this parameter
- Returns
true
if the geographical coordinates are visible on the screenfalse
if the geographical coordinates are not visible on the screen
- See also
- ViewportParams
Definition at line 375 of file ViewportParams.cpp.
◆ setFocusPoint()
void Marble::ViewportParams::setFocusPoint | ( | const GeoDataCoordinates & | focusPoint | ) |
Change the point of focus, overridding any previously set focus point.
- Parameters
-
focusPoint New focus point
- See also
- focusPoint resetFocusPoint
Definition at line 437 of file ViewportParams.cpp.
◆ setHeading()
void Marble::ViewportParams::setHeading | ( | qreal | heading | ) |
Definition at line 248 of file ViewportParams.cpp.
◆ setHeight()
void Marble::ViewportParams::setHeight | ( | int | newHeight | ) |
Definition at line 302 of file ViewportParams.cpp.
◆ setProjection()
void Marble::ViewportParams::setProjection | ( | Projection | newProjection | ) |
Definition at line 146 of file ViewportParams.cpp.
◆ setRadius()
void Marble::ViewportParams::setRadius | ( | int | radius | ) |
Change the radius of the planet.
- Parameters
-
radius Size of the planet radius in pixel. Non-positive values are ignored.
Definition at line 204 of file ViewportParams.cpp.
◆ setSize()
void Marble::ViewportParams::setSize | ( | const QSize & | newSize | ) |
Definition at line 307 of file ViewportParams.cpp.
◆ setWidth()
void Marble::ViewportParams::setWidth | ( | int | newWidth | ) |
Definition at line 297 of file ViewportParams.cpp.
◆ size()
QSize Marble::ViewportParams::size | ( | ) | const |
Definition at line 292 of file ViewportParams.cpp.
◆ viewLatLonAltBox()
const GeoDataLatLonAltBox & Marble::ViewportParams::viewLatLonAltBox | ( | ) | const |
Definition at line 330 of file ViewportParams.cpp.
◆ width()
int Marble::ViewportParams::width | ( | ) | const |
Definition at line 282 of file ViewportParams.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 8 2024 12:02:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.