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

marble

Marble::MarbleWidget

Marble::MarbleWidget Class Reference

A widget class that displays a view of the earth. More...

#include <MarbleWidget.h>

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

List of all members.

Public Slots

void centerOn (const GeoDataLatLonBox &box, bool animated=false)
void centerOn (const GeoDataCoordinates &point, bool animated=false)
void centerOn (const QModelIndex &index, bool animated=false)
void centerOn (const qreal &lon, const qreal &lat, bool animated=false)
void centerSun ()
void changeCurrentPosition (qreal lon, qreal lat)
void clearPersistentTileCache ()
void clearVolatileTileCache ()
void creatingTilesStart (TileCreator *creator, const QString &name, const QString &description)
void goHome ()
void home (qreal &lon, qreal &lat, int &zoom)
void moveDown ()
void moveLeft ()
void moveRight ()
void moveUp ()
void notifyMouseClick (int x, int y)
void openGpxFile (QString &filename)
void rotateBy (const Quaternion &incRot)
void rotateBy (const qreal &deltaLon, const qreal &deltaLat)
void scheduleRepaint (QRegion dirtyRegion)
void setAnimationsEnabled (bool enabled)
void setCenterLatitude (qreal lat)
void setCenterLongitude (qreal lon)
void setHome (const GeoDataCoordinates &homePoint, int zoom=1050)
void setHome (qreal lon, qreal lat, int zoom=1050)
void setInputEnabled (bool)
void setMapQuality (Marble::MapQuality, Marble::ViewContext=Marble::Still)
void setMapThemeId (const QString &maptheme)
void setPersistentTileCacheLimit (quint64 kiloBytes)
void setProjection (Projection projection)
void setProjection (int projection)
void setPropertyValue (const QString &name, bool value)
void setSelection (const QRect &region)
void setShowAtmosphere (bool visible)
void setShowBorders (bool visible)
void setShowCities (bool visible)
void setShowClouds (bool visible)
void setShowCompass (bool visible)
void setShowCrosshairs (bool visible)
void setShowElevationModel (bool visible)
void setShowFrameRate (bool visible)
void setShowGps (bool visible)
void setShowGrid (bool visible)
void setShowIceLayer (bool visible)
void setShowLakes (bool visible)
void setShowOtherPlaces (bool visible)
void setShowOverviewMap (bool visible)
void setShowPlaces (bool visible)
void setShowRelief (bool visible)
void setShowRivers (bool visible)
void setShowScaleBar (bool visible)
void setShowTerrain (bool visible)
void setShowTileId (bool visible)
void setViewContext (Marble::ViewContext viewContext)
void setVolatileTileCacheLimit (quint64 kiloBytes)
void updateChangedMap ()
void updateGps ()
void updateSun ()
void zoomIn ()
void zoomOut ()
void zoomView (int zoom)
void zoomViewBy (int zoomStep)

Signals

void distanceChanged (const QString &distanceString)
void framesPerSecond (qreal fps)
void mouseClickGeoPosition (qreal lon, qreal lat, GeoDataCoordinates::Unit)
void mouseMoveGeoPosition (QString)
void pluginSettingsChanged ()
void projectionChanged (Projection)
void regionSelected (const QList< double > &)
void themeChanged (QString theme)
void timeout ()
void zoomChanged (int zoom)

Public Member Functions

 MarbleWidget (MarbleMap *map, QWidget *parent=0)
 MarbleWidget (QWidget *parent=0)
virtual ~MarbleWidget ()
const QRegion activeRegion ()
void addPlacemarkData (const QString &data, const QString &key="data")
void addPlacemarkFile (const QString &filename)
bool animationsEnabled () const
qreal centerLatitude () const
qreal centerLongitude () const
Marble::AngleUnit defaultAngleUnit () const
QFont defaultFont () const
qreal distance () const
QString distanceString () const
FileViewModel * fileViewModel () const
QList< AbstractFloatItem * > floatItems () const
bool geoCoordinates (int x, int y, qreal &lon, qreal &lat, GeoDataCoordinates::Unit=GeoDataCoordinates::Degree)
GpxFileModel * gpxFileModel ()
MarbleWidgetInputHandler * inputHandler () const
MarbleMap * map () const
Marble::MapQuality mapQuality (Marble::ViewContext=Marble::Still)
const QRegion mapRegion ()
QPixmap mapScreenShot ()
Marble::GeoSceneDocument * mapTheme () const
QString mapThemeId () const
int maximumZoom () const
int minimumZoom () const
MarbleModel * model () const
qreal moveStep ()
bool needsUpdate () const
int northPoleY ()
QString password () const
quint64 persistentTileCacheLimit () const
QAbstractItemModel * placemarkModel () const
QItemSelectionModel * placemarkSelectionModel () const
Quaternion planetAxis () const
Projection projection () const
QString proxyHost () const
quint16 proxyPort () const
int radius () const
void readPluginSettings (QSettings &settings)
void removePlacemarkKey (const QString &key)
QList< RenderPlugin * > renderPlugins () const
bool screenCoordinates (qreal lon, qreal lat, qreal &x, qreal &y)
void setDefaultAngleUnit (Marble::AngleUnit angleUnit)
void setDefaultFont (const QFont &font)
void setDistance (qreal distance)
void setInputHandler (MarbleWidgetInputHandler *handler)
void setNeedsUpdate ()
void setProxy (const QString &proxyHost, const quint16 proxyPort, const QString &user, const QString &password)
void setRadius (int radius)
bool showAtmosphere () const
bool showBorders () const
bool showCities () const
bool showClouds () const
bool showCompass () const
bool showCrosshairs () const
bool showElevationModel () const
bool showFrameRate () const
bool showGps () const
bool showGrid () const
bool showIceLayer () const
bool showLakes () const
bool showOtherPlaces () const
bool showOverviewMap () const
bool showPlaces () const
bool showRelief () const
bool showRivers () const
bool showScaleBar () const
bool showTerrain () const
SunLocator * sunLocator ()
QString user () const
Marble::ViewContext viewContext () const
quint64 volatileTileCacheLimit () const
void writePluginSettings (QSettings &settings) const
int zoom () const

Protected Member Functions

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

Properties

qreal latitude
qreal longitude
QString mapThemeId
quint64 persistentTileCacheLimit
int projection
bool showAtmosphere
bool showBorders
bool showCities
bool showClouds
bool showCompass
bool showCrosshairs
bool showElevationModel
bool showGrid
bool showIceLayer
bool showLakes
bool showOtherPlaces
bool showOverviewMap
bool showPlaces
bool showRelief
bool showRivers
bool showScaleBar
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 needs to be provided with a data model to work. This model is contained in the MarbleModel class, and it is painted by using a MarbleMap. The widget can also construct its own map and model if none is given to the constructor. A MarbleModel contains 3 separate datatypes: 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.

The right mouse button controls a distance tool. The distance tool is implemented as a menu where you can choose to either create or remove so called Measure Points. Marble will keep track of the Measure Points and show the total distance in the upper left of the widget. Measure Points are shown on the map as a little white cross.

See also:
MarbleControlBox
MarbleMap
MarbleModel

Definition at line 113 of file MarbleWidget.h.


Constructor & Destructor Documentation

Marble::MarbleWidget::MarbleWidget ( QWidget *  parent = 0  )  [explicit]

Construct a new MarbleWidget.

Parameters:
parent the 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 128 of file MarbleWidget.cpp.

Marble::MarbleWidget::MarbleWidget ( MarbleMap *  map,
QWidget *  parent = 0 
) [explicit]

Construct a new MarbleWidget.

Parameters:
model the data model for the widget.
parent the parent widget

This constructor should be used when you plan to use more than one MarbleWidget for the same MarbleModel (not yet supported, but will be soon).

Definition at line 137 of file MarbleWidget.cpp.

Marble::MarbleWidget::~MarbleWidget (  )  [virtual]

Definition at line 145 of file MarbleWidget.cpp.


Member Function Documentation

const QRegion Marble::MarbleWidget::activeRegion (  ) 

Return the active region in which it's possible to drag the view using the mouse.

Definition at line 819 of file MarbleWidget.cpp.

void Marble::MarbleWidget::addPlacemarkData ( const QString &  data,
const QString &  key = "data" 
)

Add GeoDataPlacemark data as string to the model.

Parameters:
data the string containing the Placemarks.
key the string needed to identify the data

Definition at line 347 of file MarbleWidget.cpp.

void Marble::MarbleWidget::addPlacemarkFile ( const QString &  filename  ) 

Add a GeoDataPlacemark file to the model.

Parameters:
filename the filename of the file containing the Placemarks.

Definition at line 341 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::animationsEnabled (  )  const

Retrieve whether travels to a point should get animated.

Definition at line 1190 of file MarbleWidget.cpp.

qreal Marble::MarbleWidget::centerLatitude (  )  const

Return the latitude of the center point.

Definition at line 809 of file MarbleWidget.cpp.

qreal Marble::MarbleWidget::centerLongitude (  )  const

Return the longitude of the center point.

Definition at line 814 of file MarbleWidget.cpp.

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

Center the view on a bounding box so that it completley 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:
box The GeoDataLatLonBox to zoom and move the MarbleWidget to.

Definition at line 616 of file MarbleWidget.cpp.

void Marble::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 paramerter 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:
point the point in 3 dimensions above the globe to move the view to. It will always be looking vertically down.

Definition at line 587 of file MarbleWidget.cpp.

void Marble::MarbleWidget::centerOn ( const QModelIndex &  index,
bool  animated = false 
) [slot]

Center the view on a point.

Parameters:
index an index for a QModel, indicating a city

Definition at line 556 of file MarbleWidget.cpp.

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

Center the view on a geographical point.

Parameters:
lat an angle in degrees parallel to the latitude lines +90(N) - -90(S)
lon an angle in degrees parallel to the longitude lines +180(W) - -180(E)

Definition at line 536 of file MarbleWidget.cpp.

void Marble::MarbleWidget::centerSun (  )  [slot]

Definition at line 1268 of file MarbleWidget.cpp.

void Marble::MarbleWidget::changeCurrentPosition ( qreal  lon,
qreal  lat 
) [slot]

Set the current Gps position.

Parameters:
lat the new latitude value
lon the new longitude value

Definition at line 1055 of file MarbleWidget.cpp.

void Marble::MarbleWidget::clearPersistentTileCache (  )  [slot]

Definition at line 1100 of file MarbleWidget.cpp.

void Marble::MarbleWidget::clearVolatileTileCache (  )  [slot]

Definition at line 1110 of file MarbleWidget.cpp.

void Marble::MarbleWidget::connectNotify ( const char *  signal  )  [protected]

Definition at line 775 of file MarbleWidget.cpp.

void Marble::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:
creator the tile creator object.
name the name of the created theme.
description a 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 1123 of file MarbleWidget.cpp.

void Marble::MarbleWidget::customPaint ( GeoPainter *  painter  )  [protected, virtual]

Enables custom drawing onto the MarbleWidget straight after.

the globe and before all other layers has been rendered.

Parameters:
painter 

Definition at line 859 of file MarbleWidget.cpp.

Marble::AngleUnit Marble::MarbleWidget::defaultAngleUnit (  )  const

Definition at line 1200 of file MarbleWidget.cpp.

QFont Marble::MarbleWidget::defaultFont (  )  const

Definition at line 1210 of file MarbleWidget.cpp.

void Marble::MarbleWidget::disconnectNotify ( const char *  signal  )  [protected]

Definition at line 783 of file MarbleWidget.cpp.

qreal Marble::MarbleWidget::distance (  )  const

Return the current distance.

Definition at line 1242 of file MarbleWidget.cpp.

void Marble::MarbleWidget::distanceChanged ( const QString &  distanceString  )  [signal]
QString Marble::MarbleWidget::distanceString (  )  const

Return the current distance string.

Definition at line 1252 of file MarbleWidget.cpp.

FileViewModel * Marble::MarbleWidget::fileViewModel (  )  const

Return a QAbstractItemModel containing files.

Definition at line 1095 of file MarbleWidget.cpp.

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

Returns a list of all FloatItems on the widget.

Returns:
the list of the floatItems

Definition at line 1384 of file MarbleWidget.cpp.

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

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

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

void Marble::MarbleWidget::goHome (  )  [slot]

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

Definition at line 866 of file MarbleWidget.cpp.

GpxFileModel * Marble::MarbleWidget::gpxFileModel (  ) 

Return a QAbstractItemModel containing GPX files.

Definition at line 1090 of file MarbleWidget.cpp.

void Marble::MarbleWidget::home ( qreal &  lon,
qreal &  lat,
int &  zoom 
) [slot]

Get the home point.

Parameters:
lon the longitude of the home point.
lat the latitude of the home point.
zoom the default zoom level of the home point.

Definition at line 693 of file MarbleWidget.cpp.

MarbleWidgetInputHandler * Marble::MarbleWidget::inputHandler (  )  const

Returns the current input handler.

Definition at line 265 of file MarbleWidget.cpp.

void Marble::MarbleWidget::leaveEvent ( QEvent *  event  )  [protected]

Reimplementation of the leaveEvent() function in QWidget.

Reimplemented from QWidget.

Definition at line 758 of file MarbleWidget.cpp.

MarbleMap * Marble::MarbleWidget::map (  )  const

Return the map that this view shows.

Definition at line 237 of file MarbleWidget.cpp.

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

Retrieve the map quality depending on the view context.

Definition at line 1147 of file MarbleWidget.cpp.

const QRegion Marble::MarbleWidget::mapRegion (  ) 

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

Definition at line 824 of file MarbleWidget.cpp.

QPixmap Marble::MarbleWidget::mapScreenShot (  ) 

Return a QPixmap with the current contents of the widget.

Definition at line 357 of file MarbleWidget.cpp.

GeoSceneDocument * Marble::MarbleWidget::mapTheme (  )  const

Get the GeoSceneDocument object of the current map theme.

Definition at line 902 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 Marble::MarbleWidget::maximumZoom (  )  const

Return the minimum zoom value for the current map theme.

Definition at line 336 of file MarbleWidget.cpp.

int Marble::MarbleWidget::minimumZoom (  )  const

Return the minimum zoom value for the current map theme.

Definition at line 331 of file MarbleWidget.cpp.

MarbleModel * Marble::MarbleWidget::model (  )  const

Return the model that this view shows.

Definition at line 242 of file MarbleWidget.cpp.

void Marble::MarbleWidget::mouseClickGeoPosition ( qreal  lon,
qreal  lat,
GeoDataCoordinates::Unit   
) [signal]
void Marble::MarbleWidget::mouseMoveGeoPosition ( QString   )  [signal]
void Marble::MarbleWidget::moveDown (  )  [slot]

Move down by the moveStep.

Definition at line 746 of file MarbleWidget.cpp.

void Marble::MarbleWidget::moveLeft (  )  [slot]

Move left by the moveStep.

Definition at line 709 of file MarbleWidget.cpp.

void Marble::MarbleWidget::moveRight (  )  [slot]

Move right by the moveStep.

Definition at line 721 of file MarbleWidget.cpp.

qreal Marble::MarbleWidget::moveStep (  ) 

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

Returns:
The move step.

Definition at line 321 of file MarbleWidget.cpp.

void Marble::MarbleWidget::moveUp (  )  [slot]

Move up by the moveStep.

Definition at line 734 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::needsUpdate (  )  const

Return if the widget needs to be updated.

Definition at line 300 of file MarbleWidget.cpp.

int Marble::MarbleWidget::northPoleY (  ) 

Get the Y coordinate of the North Pole.

Returns:
the pixel address of the geographical north pole.

Definition at line 791 of file MarbleWidget.cpp.

void Marble::MarbleWidget::notifyMouseClick ( int  x,
int  y 
) [slot]

Used to notify about the position of the mouse click.

Definition at line 1061 of file MarbleWidget.cpp.

void Marble::MarbleWidget::openGpxFile ( QString &  filename  )  [slot]

Opens a gpx file for viewing on the Marble Widget.

Definition at line 1085 of file MarbleWidget.cpp.

void Marble::MarbleWidget::paintEvent ( QPaintEvent *  event  )  [protected]

Reimplementation of the paintEvent() function in QWidget.

Reimplemented from QWidget.

Definition at line 829 of file MarbleWidget.cpp.

QString Marble::MarbleWidget::password (  )  const

Definition at line 1340 of file MarbleWidget.cpp.

quint64 Marble::MarbleWidget::persistentTileCacheLimit (  )  const

Returns the limit in kilobytes of the persistent (on hard disc) tile cache.

Returns:
the limit of persistent tile cache
QAbstractItemModel * Marble::MarbleWidget::placemarkModel (  )  const

Returns the model for all the placemarks on the globe.

Definition at line 311 of file MarbleWidget.cpp.

QItemSelectionModel * Marble::MarbleWidget::placemarkSelectionModel (  )  const

Returns the selection model for all the placemarks on the globe.

Definition at line 316 of file MarbleWidget.cpp.

Quaternion Marble::MarbleWidget::planetAxis (  )  const

Return the quaternion that specifies the rotation of the globe.

Returns:
The quaternion that describes the rotation of the globe.

Definition at line 270 of file MarbleWidget.cpp.

void Marble::MarbleWidget::pluginSettingsChanged (  )  [signal]

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

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]
QString Marble::MarbleWidget::proxyHost (  )  const

Definition at line 1325 of file MarbleWidget.cpp.

quint16 Marble::MarbleWidget::proxyPort (  )  const

Definition at line 1330 of file MarbleWidget.cpp.

int Marble::MarbleWidget::radius (  )  const

Return the radius of the globe in pixels.

Definition at line 276 of file MarbleWidget.cpp.

void Marble::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:
settings The QSettings object to be used.

Definition at line 1350 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 Marble::MarbleWidget::removePlacemarkKey ( const QString &  key  ) 

remove data or files from the model.

Parameters:
key either the filename or the string used to identify the data in addPlacemarkFile and addPlacemarkData

Definition at line 352 of file MarbleWidget.cpp.

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

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

Returns:
the list of RenderPlugins

Definition at line 1345 of file MarbleWidget.cpp.

void Marble::MarbleWidget::resizeEvent ( QResizeEvent *   )  [protected]

Reimplementation of the resizeEvent() function in QWidget.

Reimplemented from QWidget.

Definition at line 763 of file MarbleWidget.cpp.

void Marble::MarbleWidget::rotateBy ( const Quaternion &  incRot  )  [slot]

Rotate the view by the angle specified by a Quaternion.

Parameters:
incRot a quaternion specifying the rotation

Definition at line 511 of file MarbleWidget.cpp.

void Marble::MarbleWidget::rotateBy ( const qreal &  deltaLon,
const qreal &  deltaLat 
) [slot]

Rotate the view by the two angles phi and theta.

Parameters:
deltaLon an angle that specifies the change in terms of longitude
deltaLat an 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 523 of file MarbleWidget.cpp.

void Marble::MarbleWidget::scheduleRepaint ( QRegion  dirtyRegion  )  [slot]

Schedule repaint.

Definition at line 1139 of file MarbleWidget.cpp.

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

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

Parameters:
lon the lon coordinate of the requested pixel position
lat the lat coordinate of the requested pixel position
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 screen false if the geographical coordinates are not visible on the screen

Definition at line 796 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setAnimationsEnabled ( bool  enabled  )  [slot]

Set whether travels to a point should get animated.

Definition at line 1195 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setCenterLatitude ( qreal  lat  )  [slot]

Set the latitude for the center point.

Parameters:
lat the new value for the latitude

Definition at line 653 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setCenterLongitude ( qreal  lon  )  [slot]

Set the longitude for the center point.

Parameters:
lon the new value for the longitude

Definition at line 663 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setDefaultAngleUnit ( Marble::AngleUnit  angleUnit  ) 

Definition at line 1205 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setDefaultFont ( const QFont &  font  ) 

Definition at line 1215 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setDistance ( qreal  distance  ) 

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

Parameters:
distance The new distance in km.

Definition at line 1247 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setHome ( const GeoDataCoordinates &  homePoint,
int  zoom = 1050 
) [slot]

Set the home point.

Parameters:
homePoint the new home point.
zoom the default zoom level for the new home point.

Definition at line 703 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setHome ( qreal  lon,
qreal  lat,
int  zoom = 1050 
) [slot]

Set the home point.

Parameters:
lon the longitude of the new home point.
lat the latitude of the new home point.
zoom the default zoom level for the new home point.

Definition at line 698 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setInputEnabled ( bool  enabled  )  [slot]

Definition at line 1286 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setInputHandler ( MarbleWidgetInputHandler *  handler  ) 

Set the input handler.

Definition at line 248 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setMapQuality ( Marble::MapQuality  mapQuality,
Marble::ViewContext  changedViewContext = Marble::Still 
) [slot]

Set the map quality depending on the view context.

Definition at line 1156 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setMapThemeId ( const QString &  maptheme  )  [slot]

Set a new map theme.

Parameters:
maptheme The 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 883 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setNeedsUpdate (  ) 

Mark the widget as needing an update.

Definition at line 305 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setPersistentTileCacheLimit ( quint64  kiloBytes  )  [slot]

Set the limit of the persistent (on hard disc) tile cache.

Parameters:
kilobytes The limit in kilobytes, 0 means no limit.

Definition at line 1105 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setProjection ( Projection  projection  )  [slot]

Definition at line 678 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setProjection ( int  projection  )  [slot]

Set the Projection used for the map.

Parameters:
projection projection type (e.g. Spherical, Equirectangular, Mercator)

Definition at line 688 of file MarbleWidget.cpp.

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

Sets the value of a map theme property.

Parameters:
value value of the property (usually: visibility)

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

Definition at line 907 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setProxy ( const QString &  proxyHost,
const quint16  proxyPort,
const QString &  user,
const QString &  password 
)

Definition at line 1307 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setRadius ( int  radius  ) 

Set the radius of the globe in pixels.

Parameters:
radius The new globe radius value in pixels.

Definition at line 281 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setSelection ( const QRect &  region  )  [slot]

Definition at line 1220 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowAtmosphere ( bool  visible  )  [slot]

Set whether the atmospheric glow is visible.

Parameters:
visible visibility of the atmospheric glow

Definition at line 945 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowBorders ( bool  visible  )  [slot]

Set whether the borders visible.

Parameters:
visible visibility of the borders

Definition at line 1015 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowCities ( bool  visible  )  [slot]

Set whether the city place mark overlay is visible.

Parameters:
visible visibility of the city place marks

Definition at line 973 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowClouds ( bool  visible  )  [slot]

Set whether the cloud cover is visible.

Parameters:
visible visibility of the cloud cover

Definition at line 938 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowCompass ( bool  visible  )  [slot]

Set whether the compass overlay is visible.

Parameters:
visible visibility of the compass

Definition at line 931 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowCrosshairs ( bool  visible  )  [slot]

Set whether the crosshairs are visible.

Parameters:
visible visibility of the crosshairs

Definition at line 952 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowElevationModel ( bool  visible  )  [slot]

Set whether the elevation model is visible.

Parameters:
visible visibility of the elevation model

Definition at line 1001 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowFrameRate ( bool  visible  )  [slot]

Set whether the frame rate gets shown.

Parameters:
visible visibility of the frame rate

Definition at line 1036 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowGps ( bool  visible  )  [slot]

Set whether Gps Data is visible.

Parameters:
visible visibility of the Gps Data

Definition at line 1043 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowGrid ( bool  visible  )  [slot]

Set whether the coordinate grid overlay is visible.

Parameters:
visible visibility of the coordinate grid

Definition at line 959 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowIceLayer ( bool  visible  )  [slot]

Set whether the ice layer is visible.

Parameters:
visible visibility of the ice layer

Definition at line 1008 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowLakes ( bool  visible  )  [slot]

Set whether the lakes are visible.

Parameters:
visible visibility of the lakes

Definition at line 1029 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowOtherPlaces ( bool  visible  )  [slot]

Set whether the other places overlay is visible.

Parameters:
visible visibility of other places

Definition at line 987 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowOverviewMap ( bool  visible  )  [slot]

Set whether the overview map overlay is visible.

Parameters:
visible visibility of the overview map

Definition at line 917 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowPlaces ( bool  visible  )  [slot]

Set whether the place mark overlay is visible.

Parameters:
visible visibility of the place marks

Definition at line 966 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowRelief ( bool  visible  )  [slot]

Set whether the relief is visible.

Parameters:
visible visibility of the relief

Definition at line 994 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowRivers ( bool  visible  )  [slot]

Set whether the rivers are visible.

Parameters:
visible visibility of the rivers

Definition at line 1022 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowScaleBar ( bool  visible  )  [slot]

Set whether the scale bar overlay is visible.

Parameters:
visible visibility of the scale bar

Definition at line 924 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setShowTerrain ( bool  visible  )  [slot]

Set whether the terrain place mark overlay is visible.

Parameters:
visible visibility of the terrain place marks

Definition at line 980 of file MarbleWidget.cpp.

void Marble::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:
visible visibility of the tile

Definition at line 1050 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setViewContext ( Marble::ViewContext  viewContext  )  [slot]

Set the view context (i.e.

still or animated map)

Definition at line 1180 of file MarbleWidget.cpp.

void Marble::MarbleWidget::setVolatileTileCacheLimit ( quint64  kiloBytes  )  [slot]

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

Parameters:
kilobytes The limit in kilobytes.

Definition at line 1116 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::showAtmosphere (  )  const

Return whether the atmospheric glow is visible.

Returns:
The cloud cover visibility.
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::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 Marble::MarbleWidget::showElevationModel (  )  const

Return whether the elevation model is visible.

Returns:
The elevation model visibility.
bool Marble::MarbleWidget::showFrameRate (  )  const

Return whether the frame rate gets displayed.

Returns:
the frame rates visibility

Definition at line 452 of file MarbleWidget.cpp.

bool Marble::MarbleWidget::showGps (  )  const

Return whether Gps Data is visible.

Returns:
The Gps Data's visibility.

Definition at line 447 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::showTerrain (  )  const

Return whether the terrain place marks are visible.

Returns:
The terrain place mark visibility.
SunLocator * Marble::MarbleWidget::sunLocator (  ) 

Definition at line 1281 of file MarbleWidget.cpp.

void Marble::MarbleWidget::themeChanged ( QString  theme  )  [signal]

Signal that the theme has changed.

Parameters:
theme Name of the new theme.
void Marble::MarbleWidget::timeout (  )  [signal]
void Marble::MarbleWidget::updateChangedMap (  )  [slot]

Update the widget because the model changed.

Definition at line 1132 of file MarbleWidget.cpp.

void Marble::MarbleWidget::updateGps (  )  [slot]

Updates the gps tracking point by polling.

Definition at line 1073 of file MarbleWidget.cpp.

void Marble::MarbleWidget::updateSun (  )  [slot]

Definition at line 1257 of file MarbleWidget.cpp.

QString Marble::MarbleWidget::user (  )  const

Definition at line 1335 of file MarbleWidget.cpp.

ViewContext Marble::MarbleWidget::viewContext (  )  const

Retrieve the view context (i.e.

still or animated map)

Definition at line 1175 of file MarbleWidget.cpp.

quint64 Marble::MarbleWidget::volatileTileCacheLimit (  )  const

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

Returns:
the limit of volatile tile cache
void Marble::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:
settings The QSettings object to be used.

Definition at line 1367 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:
zoom The new zoom value.
See also:
zoomView()
void Marble::MarbleWidget::zoomIn (  )  [slot]

Zoom in by the amount zoomStep.

Definition at line 501 of file MarbleWidget.cpp.

void Marble::MarbleWidget::zoomOut (  )  [slot]

Zoom out by the amount zoomStep.

Definition at line 506 of file MarbleWidget.cpp.

void Marble::MarbleWidget::zoomView ( int  zoom  )  [slot]

Zoom the view to a certain zoomlevel.

Parameters:
zoom the 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 468 of file MarbleWidget.cpp.

void Marble::MarbleWidget::zoomViewBy ( int  zoomStep  )  [slot]

Zoom the view by a certain step.

Parameters:
zoomStep the difference between the old zoom and the new

Definition at line 495 of file MarbleWidget.cpp.


Property Documentation

qreal Marble::MarbleWidget::latitude [read, write]

Definition at line 126 of file MarbleWidget.h.

qreal Marble::MarbleWidget::longitude [read, write]

Definition at line 125 of file MarbleWidget.h.

QString Marble::MarbleWidget::mapThemeId [read, write]

Definition at line 122 of file MarbleWidget.h.

quint64 Marble::MarbleWidget::persistentTileCacheLimit [read, write]

Definition at line 150 of file MarbleWidget.h.

Projection Marble::MarbleWidget::projection [read, write]

Definition at line 123 of file MarbleWidget.h.

bool Marble::MarbleWidget::showAtmosphere [read, write]

Definition at line 134 of file MarbleWidget.h.

bool Marble::MarbleWidget::showBorders [read, write]

Definition at line 146 of file MarbleWidget.h.

bool Marble::MarbleWidget::showCities [read, write]

Definition at line 138 of file MarbleWidget.h.

bool Marble::MarbleWidget::showClouds [read, write]

Definition at line 133 of file MarbleWidget.h.

bool Marble::MarbleWidget::showCompass [read, write]

Definition at line 130 of file MarbleWidget.h.

bool Marble::MarbleWidget::showCrosshairs [read, write]

Definition at line 135 of file MarbleWidget.h.

bool Marble::MarbleWidget::showElevationModel [read, write]

Definition at line 143 of file MarbleWidget.h.

bool Marble::MarbleWidget::showGrid [read, write]

Definition at line 131 of file MarbleWidget.h.

bool Marble::MarbleWidget::showIceLayer [read, write]

Definition at line 145 of file MarbleWidget.h.

bool Marble::MarbleWidget::showLakes [read, write]

Definition at line 148 of file MarbleWidget.h.

bool Marble::MarbleWidget::showOtherPlaces [read, write]

Definition at line 140 of file MarbleWidget.h.

bool Marble::MarbleWidget::showOverviewMap [read, write]

Definition at line 128 of file MarbleWidget.h.

bool Marble::MarbleWidget::showPlaces [read, write]

Definition at line 137 of file MarbleWidget.h.

bool Marble::MarbleWidget::showRelief [read, write]

Definition at line 142 of file MarbleWidget.h.

bool Marble::MarbleWidget::showRivers [read, write]

Definition at line 147 of file MarbleWidget.h.

bool Marble::MarbleWidget::showScaleBar [read, write]

Definition at line 129 of file MarbleWidget.h.

bool Marble::MarbleWidget::showTerrain [read, write]

Definition at line 139 of file MarbleWidget.h.

quint64 Marble::MarbleWidget::volatileTileCacheLimit [read, write]

Definition at line 151 of file MarbleWidget.h.

int Marble::MarbleWidget::zoom [read, write]

Definition at line 120 of file MarbleWidget.h.


The documentation for this class was generated from the following files:
  • MarbleWidget.h
  • MarbleWidget.cpp

marble

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

kdeedu

Skip menu "kdeedu"
  •     lib
  • kalzium
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  •   stepcore
Generated for kdeedu by doxygen 1.5.9-20090814
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal