marble
#include <ViewportParams.h>
Public Member Functions | |
ViewportParams () | |
ViewportParams (Projection projection, qreal centerLongitude=0, qreal centerLatatitude=0, int radius=2000, const QSize &size=QSize(100, 100)) | |
~ViewportParams () | |
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 |
int | height () const |
GeoDataLatLonAltBox | latLonAltBox (const QRect &screenRect) const |
bool | mapCoversViewport () const |
QRegion | mapRegion () const |
QPainterPath | mapShape () const |
MARBLE_DEPRECATED (void centerCoordinates(qreal ¢erLon, qreal ¢erLat) const ) | |
Quaternion | planetAxis () const |
const matrix & | planetAxisMatrix () const |
int | polarity () const |
Projection | projection () const |
int | radius () const |
void | resetFocusPoint () |
bool | resolves (const GeoDataLatLonBox &latLonBox) const |
bool | resolves (const GeoDataLatLonAltBox &latLonAltBox) const |
bool | resolves (const GeoDataCoordinates &coord1, const GeoDataCoordinates &coord2) const |
bool | screenCoordinates (const qreal lon, const qreal lat, qreal &x, qreal &y) const |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, qreal &x, qreal &y, bool &globeHidesPoint) const |
bool | screenCoordinates (const GeoDataCoordinates &geopoint, qreal &x, qreal &y) const |
bool | screenCoordinates (const GeoDataCoordinates &coordinates, qreal *x, qreal &y, int &pointRepeatNum, const QSizeF &size, bool &globeHidesPoint) const |
bool | screenCoordinates (const GeoDataLineString &lineString, QVector< QPolygonF * > &polygons) const |
void | setFocusPoint (const GeoDataCoordinates &focusPoint) |
void | setHeight (int newHeight) |
void | setProjection (Projection newProjection) |
void | setRadius (int radius) |
void | setSize (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 44 of file ViewportParams.h.
Constructor & Destructor Documentation
Marble::ViewportParams::ViewportParams | ( | ) |
Definition at line 104 of file ViewportParams.cpp.
|
explicit |
Definition at line 110 of file ViewportParams.cpp.
Marble::ViewportParams::~ViewportParams | ( | ) |
Definition at line 119 of file ViewportParams.cpp.
Member Function Documentation
qreal Marble::ViewportParams::angularResolution | ( | ) | const |
Definition at line 322 of file ViewportParams.cpp.
qreal Marble::ViewportParams::centerLatitude | ( | ) | const |
Definition at line 294 of file ViewportParams.cpp.
qreal Marble::ViewportParams::centerLongitude | ( | ) | const |
Definition at line 289 of file ViewportParams.cpp.
void Marble::ViewportParams::centerOn | ( | qreal | lon, |
qreal | lat | ||
) |
Definition at line 210 of file ViewportParams.cpp.
const AbstractProjection * Marble::ViewportParams::currentProjection | ( | ) | const |
Definition at line 134 of file ViewportParams.cpp.
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 413 of file ViewportParams.cpp.
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 391 of file ViewportParams.cpp.
int Marble::ViewportParams::height | ( | ) | const |
Definition at line 255 of file ViewportParams.cpp.
GeoDataLatLonAltBox Marble::ViewportParams::latLonAltBox | ( | const QRect & | screenRect | ) | const |
Definition at line 317 of file ViewportParams.cpp.
bool Marble::ViewportParams::mapCoversViewport | ( | ) | const |
Definition at line 398 of file ViewportParams.cpp.
QRegion Marble::ViewportParams::mapRegion | ( | ) | const |
Definition at line 408 of file ViewportParams.cpp.
QPainterPath Marble::ViewportParams::mapShape | ( | ) | const |
Definition at line 403 of file ViewportParams.cpp.
Marble::ViewportParams::MARBLE_DEPRECATED | ( | void centerCoordinates(qreal ¢erLon, qreal ¢erLat) | const | ) |
Quaternion Marble::ViewportParams::planetAxis | ( | ) | const |
Definition at line 240 of file ViewportParams.cpp.
const matrix & Marble::ViewportParams::planetAxisMatrix | ( | ) | const |
Definition at line 245 of file ViewportParams.cpp.
int Marble::ViewportParams::polarity | ( | ) | const |
Definition at line 150 of file ViewportParams.cpp.
Projection Marble::ViewportParams::projection | ( | ) | const |
Definition at line 129 of file ViewportParams.cpp.
int Marble::ViewportParams::radius | ( | ) | const |
Definition at line 195 of file ViewportParams.cpp.
void Marble::ViewportParams::resetFocusPoint | ( | ) |
Invalidate any focus point set with setFocusPoint.
- See also
- focusPoint setFocusPoint
Definition at line 432 of file ViewportParams.cpp.
bool Marble::ViewportParams::resolves | ( | const GeoDataLatLonBox & | latLonBox | ) | const |
Definition at line 330 of file ViewportParams.cpp.
bool Marble::ViewportParams::resolves | ( | const GeoDataLatLonAltBox & | latLonAltBox | ) | const |
Definition at line 336 of file ViewportParams.cpp.
bool Marble::ViewportParams::resolves | ( | const GeoDataCoordinates & | coord1, |
const GeoDataCoordinates & | coord2 | ||
) | const |
Definition at line 343 of file ViewportParams.cpp.
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 357 of file ViewportParams.cpp.
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 363 of file ViewportParams.cpp.
bool Marble::ViewportParams::screenCoordinates | ( | const GeoDataCoordinates & | geopoint, |
qreal & | x, | ||
qreal & | y | ||
) | const |
Definition at line 370 of file ViewportParams.cpp.
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 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 376 of file ViewportParams.cpp.
bool Marble::ViewportParams::screenCoordinates | ( | const GeoDataLineString & | lineString, |
QVector< QPolygonF * > & | polygons | ||
) | const |
Definition at line 385 of file ViewportParams.cpp.
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 427 of file ViewportParams.cpp.
void Marble::ViewportParams::setHeight | ( | int | newHeight | ) |
Definition at line 271 of file ViewportParams.cpp.
void Marble::ViewportParams::setProjection | ( | Projection | newProjection | ) |
Definition at line 139 of file ViewportParams.cpp.
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 200 of file ViewportParams.cpp.
void Marble::ViewportParams::setSize | ( | QSize | newSize | ) |
Definition at line 276 of file ViewportParams.cpp.
void Marble::ViewportParams::setWidth | ( | int | newWidth | ) |
Definition at line 266 of file ViewportParams.cpp.
QSize Marble::ViewportParams::size | ( | ) | const |
Definition at line 260 of file ViewportParams.cpp.
const GeoDataLatLonAltBox & Marble::ViewportParams::viewLatLonAltBox | ( | ) | const |
Definition at line 305 of file ViewportParams.cpp.
int Marble::ViewportParams::width | ( | ) | const |
Definition at line 250 of file ViewportParams.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.