• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • Marble
  • ViewportParams
Public Member Functions | List of all members
Marble::ViewportParams Class Reference

#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 &centerLon, qreal &centerLat) 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.

Marble::ViewportParams::ViewportParams ( Projection  projection,
qreal  centerLongitude = 0,
qreal  centerLatatitude = 0,
int  radius = 2000,
const QSize &  size = QSize( 100, 100 ) 
)
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
xthe x coordinate of the pixel
ythe y coordinate of the pixel
lonthe longitude angle is returned through this parameter
latthe latitude angle is returned through this parameter
unitthe unit of the angles for lon and lat.
Returns
true if the pixel (x, y) is within the globe false 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 &centerLon, qreal &centerLat)  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
lonthe lon coordinate of the requested pixel position in radians
latthe lat coordinate of the requested pixel position in radians
xthe x coordinate of the pixel is returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
Returns
true if the geographical coordinates are visible on the screen false 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
geopointthe point on earth, including altitude, that we want the coordinates for.
xthe x coordinate of the pixel is returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
globeHidesPointwhether the point gets hidden on the far side of the earth
Returns
true if the geographical coordinates are visible on the screen false 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
coordinatesthe point on earth, including altitude, that we want the coordinates for.
xthe x coordinates of the pixels are returned through this parameter
ythe y coordinate of the pixel is returned through this parameter
pointRepeatNumthe amount of times that a single geographical point gets represented on the map
globeHidesPointwhether the point gets hidden on the far side of the earth
Returns
true if the geographical coordinates are visible on the screen false 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
focusPointNew 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
radiusSize 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:
  • ViewportParams.h
  • ViewportParams.cpp
This file is part of the KDE documentation.
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.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal