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

marble

  • Marble
  • MarbleWidget
Signals | Public Member Functions | Protected Member Functions | Properties | List of all members
Marble::MarbleWidget Class Reference

#include <MarbleWidget.h>

Inheritance diagram for Marble::MarbleWidget:
Inheritance graph
[legend]

Public Slots

Position management slots
Todo:
Enable this instead of the zoomView slot below for proper deprecation warnings around Marble 1.8
void setRadius (int radius)
 
void setZoom (int zoom, FlyToMode mode=Instant)
 
void zoomView (int zoom, FlyToMode mode=Instant)
 
void zoomViewBy (int zoomStep, FlyToMode mode=Instant)
 
void zoomIn (FlyToMode mode=Automatic)
 
void zoomOut (FlyToMode mode=Automatic)
 
void setDistance (qreal distance)
 
void rotateBy (const qreal deltaLon, const qreal deltaLat, FlyToMode mode=Instant)
 
void centerOn (const qreal lon, const qreal lat, bool animated=false)
 
void centerOn (const GeoDataCoordinates &point, bool animated=false)
 
void centerOn (const GeoDataLatLonBox &box, bool animated=false)
 
void centerOn (const GeoDataPlacemark &placemark, bool animated=false)
 
void setCenterLatitude (qreal lat, FlyToMode mode=Instant)
 
void setCenterLongitude (qreal lon, FlyToMode mode=Instant)
 
void moveLeft (FlyToMode mode=Automatic)
 
void moveRight (FlyToMode mode=Automatic)
 
void moveUp (FlyToMode mode=Automatic)
 
void moveDown (FlyToMode mode=Automatic)
 
void goHome (FlyToMode mode=Automatic)
 
void flyTo (const GeoDataLookAt &lookAt, FlyToMode mode=Automatic)
 
Float items and map appearance slots
void setProjection (int projection)
 
void setProjection (Projection projection)
 
void setMapThemeId (const QString &maptheme)
 
void setPropertyValue (const QString &name, bool value)
 
void setShowOverviewMap (bool visible)
 
void setShowScaleBar (bool visible)
 
void setShowCompass (bool visible)
 
void setShowClouds (bool visible)
 
void setShowSunShading (bool visible)
 
void setShowCityLights (bool visible)
 
void setLockToSubSolarPoint (bool visible)
 
void setSubSolarPointIconVisible (bool visible)
 
void setShowAtmosphere (bool visible)
 
void setShowCrosshairs (bool visible)
 
void setShowGrid (bool visible)
 
void setShowPlaces (bool visible)
 
void setShowCities (bool visible)
 
void setShowTerrain (bool visible)
 
void setShowOtherPlaces (bool visible)
 
void setShowRelief (bool visible)
 
void setShowIceLayer (bool visible)
 
void setShowBorders (bool visible)
 
void setShowRivers (bool visible)
 
void setShowLakes (bool visible)
 
void setShowFrameRate (bool visible)
 
void setShowBackground (bool visible)
 
void setShowTileId (bool visible)
 
void setShowRuntimeTrace (bool visible)
 
void setMapQualityForViewContext (MapQuality quality, ViewContext viewContext)
 
void setViewContext (ViewContext viewContext)
 
void setAnimationsEnabled (bool enabled)
 
Tile management slots
void clearVolatileTileCache ()
 
void setVolatileTileCacheLimit (quint64 kiloBytes)
 
void creatingTilesStart (TileCreator *creator, const QString &name, const QString &description)
 
void reloadMap ()
 
void downloadRegion (QVector< TileCoordsPyramid > const &)
 
Miscellaneous slots
void notifyMouseClick (int x, int y)
 
void setSelection (const QRect &region)
 
void setInputEnabled (bool)
 
const TextureLayer * textureLayer () const
 

Signals

void distanceChanged (const QString &distanceString)
 
void framesPerSecond (qreal fps)
 
void mouseClickGeoPosition (qreal lon, qreal lat, GeoDataCoordinates::Unit)
 
void mouseMoveGeoPosition (const QString &)
 
void pluginSettingsChanged ()
 
void projectionChanged (Projection)
 
void regionSelected (const QList< double > &)
 
void renderPluginInitialized (RenderPlugin *renderPlugin)
 
void themeChanged (const QString &theme)
 
void tileLevelChanged (int level)
 
void visibleLatLonAltBoxChanged (const GeoDataLatLonAltBox &visibleLatLonAltBox)
 
void zoomChanged (int zoom)
 

Public Member Functions

 MarbleWidget (QWidget *parent=0)
 
virtual ~MarbleWidget ()
 
Access to helper objects
MarbleModel * model () const
 
ViewportParams * viewport ()
 
const ViewportParams * viewport () const
 
MarbleWidgetPopupMenu * popupMenu ()
 
MarbleWidgetInputHandler * inputHandler () const
 
void setInputHandler (MarbleWidgetInputHandler *handler)
 
QList< RenderPlugin * > renderPlugins () const
 
QList< AbstractFloatItem * > floatItems () const
 
AbstractFloatItem * floatItem (const QString &nameId) const
 
void readPluginSettings (QSettings &settings)
 
void writePluginSettings (QSettings &settings) const
 
ViewContext viewContext () const
 
GeoSceneDocument * mapTheme () const
 
QList< AbstractDataPluginItem * > whichItemAt (const QPoint &curpos) const
 
void addLayer (LayerInterface *layer)
 
void removeLayer (LayerInterface *layer)
 
RoutingLayer * routingLayer ()
 
PopupLayer * popupLayer ()
 
Projection projection () const
 
Visible map area
QString mapThemeId () const
 
QRegion mapRegion () const
 
int radius () const
 
int zoom () const
 
int tileZoomLevel () const
 
qreal distance () const
 
QString distanceString () const
 
int minimumZoom () const
 
int maximumZoom () const
 
Position management
bool screenCoordinates (qreal lon, qreal lat, qreal &x, qreal &y) const
 
bool geoCoordinates (int x, int y, qreal &lon, qreal &lat, GeoDataCoordinates::Unit=GeoDataCoordinates::Degree) const
 
qreal centerLongitude () const
 
qreal centerLatitude () const
 
qreal moveStep () const
 
GeoDataLookAt lookAt () const
 
GeoDataCoordinates focusPoint () const
 
void setFocusPoint (const GeoDataCoordinates &focusPoint)
 
void resetFocusPoint ()
 
qreal radiusFromDistance (qreal distance) const
 
qreal distanceFromRadius (qreal radius) const
 
qreal zoomFromDistance (qreal distance) const
 
qreal distanceFromZoom (qreal zoom) const
 
Placemark management
QVector< const GeoDataPlacemark * > whichFeatureAt (const QPoint &) const
 
Float items and map appearance
bool showOverviewMap () const
 
bool showScaleBar () const
 
bool showCompass () const
 
bool showClouds () const
 
bool showSunShading () const
 
bool showCityLights () const
 
bool isLockedToSubSolarPoint () const
 
bool isSubSolarPointIconVisible () const
 
bool showAtmosphere () const
 
bool showCrosshairs () const
 
bool showGrid () const
 
bool showPlaces () const
 
bool showCities () const
 
bool showTerrain () const
 
bool showOtherPlaces () const
 
bool showRelief () const
 
bool showIceLayer () const
 
bool showBorders () const
 
bool showRivers () const
 
bool showLakes () const
 
bool showFrameRate () const
 
bool showBackground () const
 
MapQuality mapQuality (ViewContext=Still) const
 
bool animationsEnabled () const
 
AngleUnit defaultAngleUnit () const
 
void setDefaultAngleUnit (AngleUnit angleUnit)
 
QFont defaultFont () const
 
void setDefaultFont (const QFont &font)
 
Tile management
quint64 volatileTileCacheLimit () const
 
Miscellaneous
QPixmap mapScreenShot ()
 

Protected Member Functions

virtual void changeEvent (QEvent *event)
 
void connectNotify (const char *signal)
 
virtual void customPaint (GeoPainter *painter)
 
void disconnectNotify (const char *signal)
 
virtual void leaveEvent (QEvent *event)
 
virtual void paintEvent (QPaintEvent *event)
 
virtual void resizeEvent (QResizeEvent *event)
 

Properties

bool isLockedToSubSolarPoint
 
bool isSubSolarPointIconVisible
 
qreal latitude
 
qreal longitude
 
QString mapThemeId
 
int projection
 
bool showAtmosphere
 
bool showBorders
 
bool showCities
 
bool showCityLights
 
bool showClouds
 
bool showCompass
 
bool showCrosshairs
 
bool showGrid
 
bool showIceLayer
 
bool showLakes
 
bool showOtherPlaces
 
bool showOverviewMap
 
bool showPlaces
 
bool showRelief
 
bool showRivers
 
bool showScaleBar
 
bool showSunShading
 
bool showTerrain
 
quint64 volatileTileCacheLimit
 
int zoom
 

Detailed Description

A widget class that displays a view of the earth.

This widget displays a view of the earth or any other globe, depending on which dataset is used. The user can navigate the globe using either a control widget, e.g. the MarbleControlBox, or the mouse. The mouse and keyboard control is done through a MarbleWidgetInputHandler. Only some aspects of the widget can be controlled by the mouse and/or keyboard.

By clicking on the globe and moving the mouse, the position can be changed. The user can also zoom by using the scroll wheel of the mouse in the widget. The zoom value is not tied to any units, but is an abstract value without any physical meaning. A value around 1000 shows the full globe in a normal-sized window. Higher zoom values give a more zoomed-in view.

The MarbleWidget owns a data model to work. This model is contained in the MarbleModel class, and it is painted by using a MarbleMap. The widget takes care of creating the map and model. A MarbleModel contains several datatypes, among them tiles which provide the background, vectors which provide things like country borders and coastlines and placemarks which can show points of interest, such as cities, mountain tops or the poles.

In addition to navigating with the mouse, you can also use it to get information about items on the map. You can either click on a placemark with the left mouse button or with the right mouse button anywhere on the map.

The left mouse button opens up a menu with all the placemarks within a certain distance from the mouse pointer. When you choose one item from the menu, Marble will open up a dialog window with some information about the placemark and also try to connect to Wikipedia to retrieve an article about it. If there is such an article, you will get a mini-browser window with the article in a tab.

See also
MarbleControlBox
MarbleMap
MarbleModel

Definition at line 102 of file MarbleWidget.h.

Constructor & Destructor Documentation

MarbleWidget::MarbleWidget ( QWidget *  parent = 0)
explicit

Construct a new MarbleWidget.

Parameters
parentthe parent widget

This constructor should be used when you will only use one MarbleWidget. The widget will create its own MarbleModel when created.

Definition at line 163 of file MarbleWidget.cpp.

MarbleWidget::~MarbleWidget ( )
virtual

Definition at line 171 of file MarbleWidget.cpp.

Member Function Documentation

void MarbleWidget::addLayer ( LayerInterface *  layer)

Add a layer to be included in rendering.

Definition at line 397 of file MarbleWidget.cpp.

bool MarbleWidget::animationsEnabled ( ) const

Retrieve whether travels to a point should get animated.

Definition at line 1141 of file MarbleWidget.cpp.

qreal MarbleWidget::centerLatitude ( ) const

Return the latitude of the center point.

Returns
The latitude of the center point in degree.

Definition at line 771 of file MarbleWidget.cpp.

qreal MarbleWidget::centerLongitude ( ) const

Return the longitude of the center point.

Returns
The longitude of the center point in degree.

Definition at line 776 of file MarbleWidget.cpp.

void MarbleWidget::centerOn ( const qreal  lon,
const qreal  lat,
bool  animated = false 
)
slot

Center the view on a geographical point.

Parameters
latan angle in degrees parallel to the latitude lines +90(N) - -90(S)
lonan angle in degrees parallel to the longitude lines +180(W) - -180(E)

Definition at line 626 of file MarbleWidget.cpp.

void MarbleWidget::centerOn ( const GeoDataCoordinates &  point,
bool  animated = false 
)
slot

Center the view on a point This method centers the Marble map on the point described by the latitude and longitude in the GeoDataCoordinate parameter point.

It also zooms the map to be at the elevation described by the altitude. If this is not the desired functionality or you do not have an accurate altitude then use

See also
centerOn(qreal, qreal, bool)
Parameters
pointthe point in 3 dimensions above the globe to move the view to. It will always be looking vertically down.

Definition at line 632 of file MarbleWidget.cpp.

void MarbleWidget::centerOn ( const GeoDataLatLonBox &  box,
bool  animated = false 
)
slot

Center the view on a bounding box so that it completely fills the viewport This method not only centers on the center of the GeoDataLatLon box but it also adjusts the zoom of the marble widget so that the LatLon box provided fills the viewport.

Parameters
boxThe GeoDataLatLonBox to zoom and move the MarbleWidget to.

Definition at line 639 of file MarbleWidget.cpp.

void MarbleWidget::centerOn ( const GeoDataPlacemark &  placemark,
bool  animated = false 
)
slot

Center the view on a placemark according to the following logic:

  • if the placemark has a lookAt, zoom and center on that lookAt
  • otherwise use the placemark geometry's latLonAltBox
    Parameters
    boxThe GeoDataPlacemark to zoom and move the MarbleWidget to.

Definition at line 664 of file MarbleWidget.cpp.

void MarbleWidget::changeEvent ( QEvent *  event)
protectedvirtual

Reimplementation of the changeEvent() function in QWidget to react to changes of the enabled state.

Definition at line 1300 of file MarbleWidget.cpp.

void MarbleWidget::clearVolatileTileCache ( )
slot

Definition at line 1087 of file MarbleWidget.cpp.

void MarbleWidget::connectNotify ( const char *  signal)
protected

Definition at line 742 of file MarbleWidget.cpp.

void MarbleWidget::creatingTilesStart ( TileCreator *  creator,
const QString &  name,
const QString &  description 
)
slot

A slot that is called when the model starts to create new tiles.

Parameters
creatorthe tile creator object.
namethe name of the created theme.
descriptiona descriptive text that can be shown in a dialog.
See also
creatingTilesProgress

This function is connected to the models signal with the same name. When the model needs to create a cache of tiles in several different resolutions, it will emit creatingTilesStart once with a name of the theme and a descriptive text. The widget can then pop up a dialog to explain why there is a delay. The model will then call creatingTilesProgress several times until the parameter reaches 100 (100%), after which the creation process is finished. After this there will be no more calls to creatingTilesProgress, and the poup dialog can then be closed.

Definition at line 1100 of file MarbleWidget.cpp.

void MarbleWidget::customPaint ( GeoPainter *  painter)
protectedvirtual

Enables custom drawing onto the MarbleWidget straight after.

the globe and before all other layers has been rendered.

Parameters
painter
Deprecated:
implement LayerInterface and add it using addLayer()

Definition at line 838 of file MarbleWidget.cpp.

AngleUnit MarbleWidget::defaultAngleUnit ( ) const

Definition at line 1151 of file MarbleWidget.cpp.

QFont MarbleWidget::defaultFont ( ) const

Definition at line 1161 of file MarbleWidget.cpp.

void MarbleWidget::disconnectNotify ( const char *  signal)
protected

Definition at line 750 of file MarbleWidget.cpp.

qreal MarbleWidget::distance ( ) const

Return the current distance.

Definition at line 1192 of file MarbleWidget.cpp.

void Marble::MarbleWidget::distanceChanged ( const QString &  distanceString)
signal
qreal MarbleWidget::distanceFromRadius ( qreal  radius) const

Return the distance (km) at the given globe radius (pixel)

Definition at line 1377 of file MarbleWidget.cpp.

qreal MarbleWidget::distanceFromZoom ( qreal  zoom) const

Returns the distance (km) corresponding to the given zoom value.

Definition at line 1398 of file MarbleWidget.cpp.

QString MarbleWidget::distanceString ( ) const

Return the current distance string.

Definition at line 1210 of file MarbleWidget.cpp.

void MarbleWidget::downloadRegion ( QVector< TileCoordsPyramid > const &  pyramid)
slot

Definition at line 1339 of file MarbleWidget.cpp.

AbstractFloatItem * MarbleWidget::floatItem ( const QString &  nameId) const

Returns the FloatItem with the given id.

Returns
The pointer to the requested floatItem,

If no item is found the null pointer is returned.

Definition at line 1295 of file MarbleWidget.cpp.

QList< AbstractFloatItem * > MarbleWidget::floatItems ( ) const

Returns a list of all FloatItems on the widget.

Returns
the list of the floatItems

Definition at line 1290 of file MarbleWidget.cpp.

void MarbleWidget::flyTo ( const GeoDataLookAt &  lookAt,
FlyToMode  mode = Automatic 
)
slot

Change the camera position to the given position.

Parameters
lookAtNew camera position. Changing the camera position means that both the current center position as well as the zoom value may change
modeInterpolation type for intermediate camera positions. Automatic (default) chooses a suitable interpolation among Instant, Lenar and Jump. Instant will directly set the new zoom and position values, while Linear results in a linear interpolation of intermediate center coordinates along the sphere and a linear interpolation of changes in the camera distance to the ground. Finally, Jump will behave the same as Linear with regard to the center position interpolation, but use a parabolic height increase towards the middle point of the intermediate positions. This appears like a jump of the camera.

Definition at line 1310 of file MarbleWidget.cpp.

GeoDataCoordinates MarbleWidget::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
centerLongitude centerLatitude setFocusPoint resetFocusPoint

Definition at line 1356 of file MarbleWidget.cpp.

void Marble::MarbleWidget::framesPerSecond ( qreal  fps)
signal
bool MarbleWidget::geoCoordinates ( int  x,
int  y,
qreal &  lon,
qreal &  lat,
GeoDataCoordinates::Unit  unit = GeoDataCoordinates::Degree 
) const

Get the earth coordinates corresponding to a pixel in the widget.

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
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 764 of file MarbleWidget.cpp.

void MarbleWidget::goHome ( FlyToMode  mode = Automatic)
slot

Center the view on the default start point with the default zoom.

Definition at line 845 of file MarbleWidget.cpp.

MarbleWidgetInputHandler * MarbleWidget::inputHandler ( ) const

Returns the current input handler.

Definition at line 321 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::isLockedToSubSolarPoint ( ) const

Return whether the globe is locked to the sub solar point.

Returns
if globe is locked to sub solar point
bool Marble::MarbleWidget::isSubSolarPointIconVisible ( ) const

Return whether the sun icon is shown in the sub solar point.

Returns
visibility of the sun icon in the sub solar point
void MarbleWidget::leaveEvent ( QEvent *  event)
protectedvirtual

Reimplementation of the leaveEvent() function in QWidget.

Definition at line 728 of file MarbleWidget.cpp.

GeoDataLookAt MarbleWidget::lookAt ( ) const

Return the lookAt.

Definition at line 1344 of file MarbleWidget.cpp.

MapQuality MarbleWidget::mapQuality ( ViewContext  viewContext = Still) const

Retrieve the map quality depending on the view context.

Definition at line 1109 of file MarbleWidget.cpp.

QRegion MarbleWidget::mapRegion ( ) const

Return the projected region which describes the (shape of the) projected surface.

Definition at line 781 of file MarbleWidget.cpp.

QPixmap MarbleWidget::mapScreenShot ( )

Return a QPixmap with the current contents of the widget.

Definition at line 412 of file MarbleWidget.cpp.

GeoSceneDocument * MarbleWidget::mapTheme ( ) const

Get the GeoSceneDocument object of the current map theme.

Definition at line 888 of file MarbleWidget.cpp.

QString Marble::MarbleWidget::mapThemeId ( ) const

Get the ID of the current map theme To ensure that a unique identifier is being used the theme does NOT get represented by its name but the by relative location of the file that specifies the theme:

Example: mapThemeId = "earth/bluemarble/bluemarble.dgml"

int MarbleWidget::maximumZoom ( ) const

Return the minimum zoom value for the current map theme.

Definition at line 382 of file MarbleWidget.cpp.

int MarbleWidget::minimumZoom ( ) const

Return the minimum zoom value for the current map theme.

Definition at line 377 of file MarbleWidget.cpp.

MarbleModel * MarbleWidget::model ( ) const

Return the model that this view shows.

Definition at line 283 of file MarbleWidget.cpp.

void Marble::MarbleWidget::mouseClickGeoPosition ( qreal  lon,
qreal  lat,
GeoDataCoordinates::Unit   
)
signal
void Marble::MarbleWidget::mouseMoveGeoPosition ( const QString &  )
signal
void MarbleWidget::moveDown ( FlyToMode  mode = Automatic)
slot

Move down by the moveStep.

Definition at line 723 of file MarbleWidget.cpp.

void MarbleWidget::moveLeft ( FlyToMode  mode = Automatic)
slot

Move left by the moveStep.

Definition at line 707 of file MarbleWidget.cpp.

void MarbleWidget::moveRight ( FlyToMode  mode = Automatic)
slot

Move right by the moveStep.

Definition at line 712 of file MarbleWidget.cpp.

qreal MarbleWidget::moveStep ( ) const

Return how much the map will move if one of the move slots are called.

Returns
The move step.

Definition at line 358 of file MarbleWidget.cpp.

void MarbleWidget::moveUp ( FlyToMode  mode = Automatic)
slot

Move up by the moveStep.

Definition at line 718 of file MarbleWidget.cpp.

void MarbleWidget::notifyMouseClick ( int  x,
int  y 
)
slot

Used to notify about the position of the mouse click.

Definition at line 1075 of file MarbleWidget.cpp.

void MarbleWidget::paintEvent ( QPaintEvent *  event)
protectedvirtual

Reimplementation of the paintEvent() function in QWidget.

Definition at line 786 of file MarbleWidget.cpp.

void Marble::MarbleWidget::pluginSettingsChanged ( )
signal

This signal is emit when the settings of a plugin changed.

PopupLayer * MarbleWidget::popupLayer ( )

Definition at line 1408 of file MarbleWidget.cpp.

MarbleWidgetPopupMenu * MarbleWidget::popupMenu ( )

Definition at line 299 of file MarbleWidget.cpp.

Projection Marble::MarbleWidget::projection ( ) const

Get the Projection used for the map.

Returns
Spherical a Globe
Equirectangular a flat map
Mercator another flat map
void Marble::MarbleWidget::projectionChanged ( Projection  )
signal
int MarbleWidget::radius ( ) const

Return the radius of the globe in pixels.

Definition at line 326 of file MarbleWidget.cpp.

qreal MarbleWidget::radiusFromDistance ( qreal  distance) const

Return the globe radius (pixel) for the given distance (km)

Definition at line 1371 of file MarbleWidget.cpp.

void MarbleWidget::readPluginSettings ( QSettings &  settings)

Reads the plugin settings from the passed QSettings.

You shouldn't use this in a KDE application as these use KConfig. Here you could use MarblePart which is handling this automatically.

Parameters
settingsThe QSettings object to be used.

Definition at line 1256 of file MarbleWidget.cpp.

void Marble::MarbleWidget::regionSelected ( const QList< double > &  )
signal

This signal is emit when a new rectangle region is selected over the map The list of double values include coordinates in degrees using this order: lon1, lat1, lon2, lat2 (or West, North, East, South) as left/top, right/bottom rectangle.

void MarbleWidget::reloadMap ( )
slot

Re-download all visible tiles.

Definition at line 1334 of file MarbleWidget.cpp.

void MarbleWidget::removeLayer ( LayerInterface *  layer)

Remove a layer from being included in rendering.

Definition at line 402 of file MarbleWidget.cpp.

void Marble::MarbleWidget::renderPluginInitialized ( RenderPlugin *  renderPlugin)
signal

Signal that a render item has been initialized.

QList< RenderPlugin * > MarbleWidget::renderPlugins ( ) const

Returns a list of all RenderPlugins on the widget, this includes float items.

Returns
the list of RenderPlugins

Definition at line 1251 of file MarbleWidget.cpp.

void MarbleWidget::resetFocusPoint ( )

Invalidate any focus point set with setFocusPoint.

See also
focusPoint setFocusPoint

Definition at line 1366 of file MarbleWidget.cpp.

void MarbleWidget::resizeEvent ( QResizeEvent *  event)
protectedvirtual

Reimplementation of the resizeEvent() function in QWidget.

Definition at line 733 of file MarbleWidget.cpp.

void MarbleWidget::rotateBy ( const qreal  deltaLon,
const qreal  deltaLat,
FlyToMode  mode = Instant 
)
slot

Rotate the view by the two angles phi and theta.

Parameters
deltaLonan angle that specifies the change in terms of longitude
deltaLatan angle that specifies the change in terms of latitude

This function rotates the view by two angles, deltaLon ("theta") and deltaLat ("phi"). If we start at (0, 0), the result will be the exact equivalent of (lon, lat), otherwise the resulting angle will be the sum of the previous position and the two offsets.

Definition at line 605 of file MarbleWidget.cpp.

RoutingLayer * MarbleWidget::routingLayer ( )

Definition at line 1403 of file MarbleWidget.cpp.

bool MarbleWidget::screenCoordinates ( qreal  lon,
qreal  lat,
qreal &  x,
qreal &  y 
) const

Get the screen coordinates corresponding to geographical coordinates in the widget.

Parameters
lonthe lon coordinate of the requested pixel position
latthe lat coordinate of the requested pixel position
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

Definition at line 758 of file MarbleWidget.cpp.

void MarbleWidget::setAnimationsEnabled ( bool  enabled)
slot

Set whether travels to a point should get animated.

Definition at line 1146 of file MarbleWidget.cpp.

void MarbleWidget::setCenterLatitude ( qreal  lat,
FlyToMode  mode = Instant 
)
slot

Set the latitude for the center point.

Parameters
latthe new value for the latitude in degree.
modethe FlyToMode that will be used.

Definition at line 680 of file MarbleWidget.cpp.

void MarbleWidget::setCenterLongitude ( qreal  lon,
FlyToMode  mode = Instant 
)
slot

Set the longitude for the center point.

Parameters
lonthe new value for the longitude in degree.
modethe FlyToMode that will be used.

Definition at line 685 of file MarbleWidget.cpp.

void MarbleWidget::setDefaultAngleUnit ( AngleUnit  angleUnit)

Definition at line 1156 of file MarbleWidget.cpp.

void MarbleWidget::setDefaultFont ( const QFont &  font)

Definition at line 1166 of file MarbleWidget.cpp.

void MarbleWidget::setDistance ( qreal  distance)
slot

Set the distance of the observer to the globe in km.

Parameters
distanceThe new distance in km.

Definition at line 1197 of file MarbleWidget.cpp.

void MarbleWidget::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 1361 of file MarbleWidget.cpp.

void MarbleWidget::setInputEnabled ( bool  enabled)
slot

Definition at line 1230 of file MarbleWidget.cpp.

void MarbleWidget::setInputHandler ( MarbleWidgetInputHandler *  handler)

Set the input handler.

Definition at line 305 of file MarbleWidget.cpp.

void MarbleWidget::setLockToSubSolarPoint ( bool  visible)
slot

Set the globe locked to the sub solar point.

Parameters
vsibleif globe is locked to the sub solar point

Definition at line 943 of file MarbleWidget.cpp.

void MarbleWidget::setMapQualityForViewContext ( MapQuality  quality,
ViewContext  viewContext 
)
slot

Set the map quality for the specified view context.

Parameters
qualitymap quality for the specified view context
viewContextview context whose map quality should be set

Definition at line 1114 of file MarbleWidget.cpp.

void MarbleWidget::setMapThemeId ( const QString &  maptheme)
slot

Set a new map theme.

Parameters
mapthemeThe ID of the new maptheme. To ensure that a unique identifier is being used the theme does NOT get represented by its name but the by relative location of the file that specifies the theme:

Example: maptheme = "earth/bluemarble/bluemarble.dgml"

Definition at line 865 of file MarbleWidget.cpp.

void MarbleWidget::setProjection ( int  projection)
slot

Set the Projection used for the map.

Parameters
projectionprojection type (e.g. Spherical, Equirectangular, Mercator)

Definition at line 702 of file MarbleWidget.cpp.

void MarbleWidget::setProjection ( Projection  projection)
slot

Definition at line 695 of file MarbleWidget.cpp.

void MarbleWidget::setPropertyValue ( const QString &  name,
bool  value 
)
slot

Sets the value of a map theme property.

Parameters
valuevalue of the property (usually: visibility)

Later on we might add a "setPropertyType and a QVariant if needed.

Definition at line 893 of file MarbleWidget.cpp.

void MarbleWidget::setRadius ( int  radius)
slot

Set the radius of the globe in pixels.

Parameters
radiusThe new globe radius value in pixels.

Definition at line 331 of file MarbleWidget.cpp.

void MarbleWidget::setSelection ( const QRect &  region)
slot

Definition at line 1171 of file MarbleWidget.cpp.

void MarbleWidget::setShowAtmosphere ( bool  visible)
slot

Set whether the atmospheric glow is visible.

Parameters
visiblevisibility of the atmospheric glow

Definition at line 967 of file MarbleWidget.cpp.

void MarbleWidget::setShowBackground ( bool  visible)
slot

Definition at line 1058 of file MarbleWidget.cpp.

void MarbleWidget::setShowBorders ( bool  visible)
slot

Set whether the borders visible.

Parameters
visiblevisibility of the borders

Definition at line 1030 of file MarbleWidget.cpp.

void MarbleWidget::setShowCities ( bool  visible)
slot

Set whether the city place mark overlay is visible.

Parameters
visiblevisibility of the city place marks

Definition at line 995 of file MarbleWidget.cpp.

void MarbleWidget::setShowCityLights ( bool  visible)
slot

Set whether city lights instead of night shadow are visible.

Parameters
visiblevisibility of city lights

Definition at line 936 of file MarbleWidget.cpp.

void MarbleWidget::setShowClouds ( bool  visible)
slot

Set whether the cloud cover is visible.

Parameters
visiblevisibility of the cloud cover

Definition at line 922 of file MarbleWidget.cpp.

void MarbleWidget::setShowCompass ( bool  visible)
slot

Set whether the compass overlay is visible.

Parameters
visiblevisibility of the compass

Definition at line 915 of file MarbleWidget.cpp.

void MarbleWidget::setShowCrosshairs ( bool  visible)
slot

Set whether the crosshairs are visible.

Parameters
visiblevisibility of the crosshairs

Definition at line 974 of file MarbleWidget.cpp.

void MarbleWidget::setShowFrameRate ( bool  visible)
slot

Set whether the frame rate gets shown.

Parameters
visiblevisibility of the frame rate

Definition at line 1051 of file MarbleWidget.cpp.

void MarbleWidget::setShowGrid ( bool  visible)
slot

Set whether the coordinate grid overlay is visible.

Parameters
visiblevisibility of the coordinate grid

Definition at line 981 of file MarbleWidget.cpp.

void MarbleWidget::setShowIceLayer ( bool  visible)
slot

Set whether the ice layer is visible.

Parameters
visiblevisibility of the ice layer

Definition at line 1023 of file MarbleWidget.cpp.

void MarbleWidget::setShowLakes ( bool  visible)
slot

Set whether the lakes are visible.

Parameters
visiblevisibility of the lakes

Definition at line 1044 of file MarbleWidget.cpp.

void MarbleWidget::setShowOtherPlaces ( bool  visible)
slot

Set whether the other places overlay is visible.

Parameters
visiblevisibility of other places

Definition at line 1009 of file MarbleWidget.cpp.

void MarbleWidget::setShowOverviewMap ( bool  visible)
slot

Set whether the overview map overlay is visible.

Parameters
visiblevisibility of the overview map

Definition at line 901 of file MarbleWidget.cpp.

void MarbleWidget::setShowPlaces ( bool  visible)
slot

Set whether the place mark overlay is visible.

Parameters
visiblevisibility of the place marks

Definition at line 988 of file MarbleWidget.cpp.

void MarbleWidget::setShowRelief ( bool  visible)
slot

Set whether the relief is visible.

Parameters
visiblevisibility of the relief

Definition at line 1016 of file MarbleWidget.cpp.

void MarbleWidget::setShowRivers ( bool  visible)
slot

Set whether the rivers are visible.

Parameters
visiblevisibility of the rivers

Definition at line 1037 of file MarbleWidget.cpp.

void MarbleWidget::setShowRuntimeTrace ( bool  visible)
slot

Set whether the runtime tracing for layers gets shown.

Parameters
visiblevisibility of the runtime tracing

Definition at line 1065 of file MarbleWidget.cpp.

void MarbleWidget::setShowScaleBar ( bool  visible)
slot

Set whether the scale bar overlay is visible.

Parameters
visiblevisibility of the scale bar

Definition at line 908 of file MarbleWidget.cpp.

void MarbleWidget::setShowSunShading ( bool  visible)
slot

Set whether the night shadow is visible.

Parameters
visibilevisibility of shadow

Definition at line 929 of file MarbleWidget.cpp.

void MarbleWidget::setShowTerrain ( bool  visible)
slot

Set whether the terrain place mark overlay is visible.

Parameters
visiblevisibility of the terrain place marks

Definition at line 1002 of file MarbleWidget.cpp.

void MarbleWidget::setShowTileId ( bool  visible)
slot

Set whether the is tile is visible NOTE: This is part of the transitional debug API and might be subject to changes until Marble 0.8.

Parameters
visiblevisibility of the tile

Definition at line 1070 of file MarbleWidget.cpp.

void MarbleWidget::setSubSolarPointIconVisible ( bool  visible)
slot

Set whether the sun icon is shown in the sub solar point.

Parameters
visibleif the sun icon is shown in the sub solar point

Definition at line 951 of file MarbleWidget.cpp.

void MarbleWidget::setViewContext ( ViewContext  viewContext)
slot

Set the view context (i.e.

still or animated map)

Definition at line 1129 of file MarbleWidget.cpp.

void MarbleWidget::setVolatileTileCacheLimit ( quint64  kiloBytes)
slot

Set the limit of the volatile (in RAM) tile cache.

Parameters
kilobytesThe limit in kilobytes.

Definition at line 1093 of file MarbleWidget.cpp.

void MarbleWidget::setZoom ( int  zoom,
FlyToMode  mode = Instant 
)
slot

Zoom the view to a certain zoomlevel.

Parameters
zoomthe new zoom level.

The zoom level is an abstract value without physical interpretation. A zoom value around 1000 lets the viewer see all of the earth in the default window.

Definition at line 533 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::showAtmosphere ( ) const

Return whether the atmospheric glow is visible.

Returns
The cloud cover visibility.
bool MarbleWidget::showBackground ( ) const

Definition at line 522 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::showBorders ( ) const

Return whether the borders are visible.

Returns
The border visibility.
bool Marble::MarbleWidget::showCities ( ) const

Return whether the city place marks are visible.

Returns
The city place mark visibility.
bool Marble::MarbleWidget::showCityLights ( ) const

Return whether the city lights are shown instead of the night shadow.

Returns
visibility of city lights
bool Marble::MarbleWidget::showClouds ( ) const

Return whether the cloud cover is visible.

Returns
The cloud cover visibility.
bool Marble::MarbleWidget::showCompass ( ) const

Return whether the compass bar is visible.

Returns
The compass visibility.
bool Marble::MarbleWidget::showCrosshairs ( ) const

Return whether the crosshairs are visible.

Returns
The crosshairs' visibility.
bool MarbleWidget::showFrameRate ( ) const

Return whether the frame rate gets displayed.

Returns
the frame rates visibility

Definition at line 517 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::showGrid ( ) const

Return whether the coordinate grid is visible.

Returns
The coordinate grid visibility.
bool Marble::MarbleWidget::showIceLayer ( ) const

Return whether the ice layer is visible.

Returns
The ice layer visibility.
bool Marble::MarbleWidget::showLakes ( ) const

Return whether the lakes are visible.

Returns
The lakes' visibility.
bool Marble::MarbleWidget::showOtherPlaces ( ) const

Return whether other places are visible.

Returns
The visibility of other places.
bool Marble::MarbleWidget::showOverviewMap ( ) const

Return whether the overview map is visible.

Returns
The overview map visibility.
bool Marble::MarbleWidget::showPlaces ( ) const

Return whether the place marks are visible.

Returns
The place mark visibility.
bool Marble::MarbleWidget::showRelief ( ) const

Return whether the relief is visible.

Returns
The relief visibility.
bool Marble::MarbleWidget::showRivers ( ) const

Return whether the rivers are visible.

Returns
The rivers' visibility.
bool Marble::MarbleWidget::showScaleBar ( ) const

Return whether the scale bar is visible.

Returns
The scale bar visibility.
bool Marble::MarbleWidget::showSunShading ( ) const

Return whether the night shadow is visible.

Returns
visibility of night shadow
bool Marble::MarbleWidget::showTerrain ( ) const

Return whether the terrain place marks are visible.

Returns
The terrain place mark visibility.
const Marble::TextureLayer * MarbleWidget::textureLayer ( ) const
slot

Definition at line 407 of file MarbleWidget.cpp.

void Marble::MarbleWidget::themeChanged ( const QString &  theme)
signal

Signal that the theme has changed.

Parameters
themeName of the new theme.
void Marble::MarbleWidget::tileLevelChanged ( int  level)
signal
int MarbleWidget::tileZoomLevel ( ) const

Definition at line 372 of file MarbleWidget.cpp.

ViewContext MarbleWidget::viewContext ( ) const

Retrieve the view context (i.e.

still or animated map)

Definition at line 1124 of file MarbleWidget.cpp.

ViewportParams * MarbleWidget::viewport ( )

Definition at line 289 of file MarbleWidget.cpp.

const ViewportParams * MarbleWidget::viewport ( ) const

Definition at line 294 of file MarbleWidget.cpp.

void Marble::MarbleWidget::visibleLatLonAltBoxChanged ( const GeoDataLatLonAltBox &  visibleLatLonAltBox)
signal

This signal is emitted when the visible region of the map changes.

This typically happens when the user moves the map around or zooms.

quint64 Marble::MarbleWidget::volatileTileCacheLimit ( ) const

Returns the limit in kilobytes of the volatile (in RAM) tile cache.

Returns
the limit of volatile tile cache
QVector< const GeoDataPlacemark * > MarbleWidget::whichFeatureAt ( const QPoint &  curpos) const

Definition at line 387 of file MarbleWidget.cpp.

QList< AbstractDataPluginItem * > MarbleWidget::whichItemAt ( const QPoint &  curpos) const

Returns all widgets of dataPlugins on the position curpos.

Definition at line 392 of file MarbleWidget.cpp.

void MarbleWidget::writePluginSettings ( QSettings &  settings) const

Writes the plugin settings in the passed QSettings.

You shouldn't use this in a KDE application as these use KConfig. Here you could use MarblePart which is handling this automatically.

Parameters
settingsThe QSettings object to be used.

Definition at line 1273 of file MarbleWidget.cpp.

int Marble::MarbleWidget::zoom ( ) const

Return the current zoom amount.

void Marble::MarbleWidget::zoomChanged ( int  zoom)
signal

Signal that the zoom has changed, and to what.

Parameters
zoomThe new zoom value.
See also
setZoom()
qreal MarbleWidget::zoomFromDistance ( qreal  distance) const

Returns the zoom value (no unit) corresponding to the given camera distance (km)

Definition at line 1393 of file MarbleWidget.cpp.

void MarbleWidget::zoomIn ( FlyToMode  mode = Automatic)
slot

Zoom in by the amount zoomStep.

Definition at line 575 of file MarbleWidget.cpp.

void MarbleWidget::zoomOut ( FlyToMode  mode = Automatic)
slot

Zoom out by the amount zoomStep.

Definition at line 590 of file MarbleWidget.cpp.

void MarbleWidget::zoomView ( int  zoom,
FlyToMode  mode = Instant 
)
slot
Deprecated:
To be removed soon. Please use setZoom instead. Same parameters.

Definition at line 563 of file MarbleWidget.cpp.

void MarbleWidget::zoomViewBy ( int  zoomStep,
FlyToMode  mode = Instant 
)
slot

Zoom the view by a certain step.

Parameters
zoomStepthe difference between the old zoom and the new

Definition at line 569 of file MarbleWidget.cpp.

Property Documentation

bool MarbleWidget::isLockedToSubSolarPoint
readwrite

Definition at line 125 of file MarbleWidget.h.

bool MarbleWidget::isSubSolarPointIconVisible
readwrite

Definition at line 126 of file MarbleWidget.h.

qreal Marble::MarbleWidget::latitude
readwrite

Definition at line 115 of file MarbleWidget.h.

qreal Marble::MarbleWidget::longitude
readwrite

Definition at line 114 of file MarbleWidget.h.

QString MarbleWidget::mapThemeId
readwrite

Definition at line 111 of file MarbleWidget.h.

Projection MarbleWidget::projection
readwrite

Definition at line 112 of file MarbleWidget.h.

bool MarbleWidget::showAtmosphere
readwrite

Definition at line 127 of file MarbleWidget.h.

bool MarbleWidget::showBorders
readwrite

Definition at line 138 of file MarbleWidget.h.

bool MarbleWidget::showCities
readwrite

Definition at line 131 of file MarbleWidget.h.

bool MarbleWidget::showCityLights
readwrite

Definition at line 124 of file MarbleWidget.h.

bool MarbleWidget::showClouds
readwrite

Definition at line 122 of file MarbleWidget.h.

bool MarbleWidget::showCompass
readwrite

Definition at line 119 of file MarbleWidget.h.

bool MarbleWidget::showCrosshairs
readwrite

Definition at line 128 of file MarbleWidget.h.

bool MarbleWidget::showGrid
readwrite

Definition at line 120 of file MarbleWidget.h.

bool MarbleWidget::showIceLayer
readwrite

Definition at line 137 of file MarbleWidget.h.

bool MarbleWidget::showLakes
readwrite

Definition at line 140 of file MarbleWidget.h.

bool MarbleWidget::showOtherPlaces
readwrite

Definition at line 133 of file MarbleWidget.h.

bool MarbleWidget::showOverviewMap
readwrite

Definition at line 117 of file MarbleWidget.h.

bool MarbleWidget::showPlaces
readwrite

Definition at line 130 of file MarbleWidget.h.

bool MarbleWidget::showRelief
readwrite

Definition at line 135 of file MarbleWidget.h.

bool MarbleWidget::showRivers
readwrite

Definition at line 139 of file MarbleWidget.h.

bool MarbleWidget::showScaleBar
readwrite

Definition at line 118 of file MarbleWidget.h.

bool MarbleWidget::showSunShading
readwrite

Definition at line 123 of file MarbleWidget.h.

bool MarbleWidget::showTerrain
readwrite

Definition at line 132 of file MarbleWidget.h.

quint64 MarbleWidget::volatileTileCacheLimit
readwrite

Definition at line 142 of file MarbleWidget.h.

int MarbleWidget::zoom
readwrite

Definition at line 109 of file MarbleWidget.h.


The documentation for this class was generated from the following files:
  • MarbleWidget.h
  • MarbleWidget.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:56 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