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

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • lib
  • marble
MarbleMap.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2006-2008 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 // Copyright 2009 Jens-Michael Hoffmann <jensmh@gmx.de>
11 //
12 
13 #ifndef MARBLE_MARBLEMAP_H
14 #define MARBLE_MARBLEMAP_H
15 
16 
25 #include <QSize>
26 #include <QString>
27 #include <QObject>
28 #include <QFont>
29 #include <QPixmap>
30 
31 #include "marble_export.h"
32 #include "GeoDataCoordinates.h" // In geodata/data/
33 
34 // Qt
35 class QAbstractItemModel;
36 class QItemSelectionModel;
37 
38 namespace Marble
39 {
40 
41 // MarbleMap
42 class MarbleMapPrivate;
43 
44 // Marble
45 class GeoDataLatLonAltBox;
46 class GeoDataPlacemark;
47 class MarbleModel;
48 class ViewportParams;
49 class GeoPainter;
50 class LayerInterface;
51 class Quaternion;
52 class RenderPlugin;
53 class AbstractDataPlugin;
54 class AbstractDataPluginItem;
55 class AbstractFloatItem;
56 class TextureLayer;
57 class TileCoordsPyramid;
58 
90 class MARBLE_EXPORT MarbleMap : public QObject
91 {
92  Q_OBJECT
93  Q_CLASSINFO("D-Bus Interface", "org.kde.MarbleMap")
94 
95  public:
96 
97  friend class MarbleWidget;
98 
106  MarbleMap();
107 
116  explicit MarbleMap( MarbleModel *model );
117 
118  virtual ~MarbleMap();
119 
123  MarbleModel *model() const;
124 
125  // Accessors to internal objects;
126  ViewportParams *viewport();
127  const ViewportParams *viewport() const;
128 
135  Projection projection() const;
136 
146  QString mapThemeId() const;
147 
148  void setMapQualityForViewContext( MapQuality qualityForViewContext, ViewContext viewContext );
149  MapQuality mapQuality( ViewContext viewContext ) const;
150 
154  MapQuality mapQuality() const;
155 
156  void setViewContext( ViewContext viewContext );
157  ViewContext viewContext() const;
158 
159  void setSize( int width, int height );
160  void setSize( const QSize& size );
161  QSize size() const;
162  int width() const;
163  int height() const;
164 
168  int radius() const;
169 
170  int preferredRadiusCeil( int radius );
171  int preferredRadiusFloor( int radius );
172 
173  int tileZoomLevel() const;
174 
178  int minimumZoom() const;
179 
183  int maximumZoom() const;
184 
194  bool screenCoordinates( qreal lon, qreal lat,
195  qreal& x, qreal& y ) const;
196 
206  bool geoCoordinates( int x, int y,
207  qreal& lon, qreal& lat,
208  GeoDataCoordinates::Unit = GeoDataCoordinates::Degree ) const;
209 
214  qreal centerLongitude() const;
215 
220  qreal centerLatitude() const;
221 
222  QVector<const GeoDataPlacemark*> whichFeatureAt( const QPoint& ) const;
223 
228  bool propertyValue( const QString& name ) const;
229 
234  bool showOverviewMap() const;
235 
240  bool showScaleBar() const;
241 
246  bool showCompass() const;
247 
252  bool showClouds() const;
253 
258  bool showSunShading() const;
259 
264  bool showCityLights() const;
265 
270  bool isLockedToSubSolarPoint() const;
271 
276  bool isSubSolarPointIconVisible() const;
277 
282  bool showAtmosphere() const;
283 
288  bool showCrosshairs() const;
289 
294  bool showGrid() const;
295 
300  bool showPlaces() const;
301 
306  bool showCities() const;
307 
312  bool showTerrain() const;
313 
318  bool showOtherPlaces() const;
319 
324  bool showRelief() const;
325 
330  bool showIceLayer() const;
331 
336  bool showBorders() const;
337 
342  bool showRivers() const;
343 
348  bool showLakes() const;
349 
354  bool showFrameRate() const;
355 
356  bool showBackground() const;
357 
362  quint64 volatileTileCacheLimit() const;
363 
368  QList<RenderPlugin *> renderPlugins() const;
369  QList<AbstractFloatItem *> floatItems() const;
370 
375  AbstractFloatItem * floatItem( const QString &nameId ) const;
376 
381  QList<AbstractDataPlugin *> dataPlugins() const;
382 
386  QList<AbstractDataPluginItem *> whichItemAt( const QPoint& curpos ) const;
387 
388  AngleUnit defaultAngleUnit() const;
389 
390  QFont defaultFont() const;
391 
392  const TextureLayer *textureLayer() const;
393 
397  void addLayer( LayerInterface *layer );
398 
402  void removeLayer( LayerInterface *layer );
403 
404  public Q_SLOTS:
405 
411  void paint( GeoPainter &painter, const QRect &dirtyRect );
412 
417  void setRadius( int radius );
418 
430  void rotateBy( const qreal &deltaLon, const qreal &deltaLat );
431 
439  void centerOn( const qreal lon, const qreal lat );
440 
445  void setCenterLatitude( qreal lat );
446 
451  void setCenterLongitude( qreal lon );
452 
457  void setProjection( Projection projection );
458 
468  void setMapThemeId( const QString& maptheme );
469 
477  void setPropertyValue( const QString& name, bool value );
478 
483  void setShowOverviewMap( bool visible );
484 
489  void setShowScaleBar( bool visible );
490 
495  void setShowCompass( bool visible );
496 
501  void setShowClouds( bool visible );
502 
507  void setShowSunShading( bool visible );
508 
513  void setShowCityLights( bool visible );
514 
519  void setLockToSubSolarPoint( bool visible );
520 
525  void setSubSolarPointIconVisible( bool visible );
526 
533  void setShowTileId( bool visible );
534 
539  void setShowAtmosphere( bool visible );
540 
545  void setShowCrosshairs( bool visible );
546 
551  void setShowGrid( bool visible );
552 
557  void setShowPlaces( bool visible );
558 
563  void setShowCities( bool visible );
564 
569  void setShowTerrain( bool visible );
570 
575  void setShowOtherPlaces( bool visible );
576 
581  void setShowRelief( bool visible );
582 
587  void setShowIceLayer( bool visible );
588 
593  void setShowBorders( bool visible );
594 
599  void setShowRivers( bool visible );
600 
605  void setShowLakes( bool visible );
606 
611  void setShowFrameRate( bool visible );
612 
613  void setShowRuntimeTrace( bool visible );
614 
615  void setShowBackground( bool visible );
616 
620  void notifyMouseClick( int x, int y );
621 
622  void clearVolatileTileCache();
627  void setVolatileTileCacheLimit( quint64 kiloBytes );
628 
629  void setDefaultAngleUnit( AngleUnit angleUnit );
630 
631  void setDefaultFont( const QFont& font );
632 
638  void reload();
639 
640  void downloadRegion( QVector<TileCoordsPyramid> const & );
641 
642  Q_SIGNALS:
643  void tileLevelChanged( int level );
644 
649  void themeChanged( const QString& theme );
650 
651  void projectionChanged( Projection );
652 
653  void radiusChanged( int radius );
654 
655  void mouseMoveGeoPosition( const QString& );
656 
657  void mouseClickGeoPosition( qreal lon, qreal lat, GeoDataCoordinates::Unit );
658 
659  void framesPerSecond( qreal fps );
660 
666  void repaintNeeded( const QRegion& dirtyRegion = QRegion() );
667 
672  void visibleLatLonAltBoxChanged( const GeoDataLatLonAltBox& visibleLatLonAltBox );
673 
677  void pluginSettingsChanged();
678 
682  void renderPluginInitialized( RenderPlugin *renderPlugin );
683 
684  protected:
685 
693  virtual void customPaint( GeoPainter *painter );
694 
695  private:
696  Q_PRIVATE_SLOT( d, void updateMapTheme() )
697  Q_PRIVATE_SLOT( d, void updateProperty( const QString &, bool ) )
698  Q_PRIVATE_SLOT( d, void setDocument(QString) )
699 
700  private:
701  Q_DISABLE_COPY( MarbleMap )
702  MarbleMapPrivate * const d;
703  friend class MarbleMapPrivate;
704 
705  class CustomPaintLayer;
706  friend class CustomPaintLayer;
707 };
708 
709 }
710 
711 #endif
Marble::GeoDataCoordinates::Unit
Unit
enum used constructor to specify the units used
Definition: GeoDataCoordinates.h:64
MarbleWidget::radius
int radius() const
GeoDataCoordinates.h
MarbleWidget::mapThemeId
QString mapThemeId() const
Returns the currently active map theme id, if any, in the form of e.g.
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
MarbleWidget::viewport
const Marble::ViewportParams * viewport() const
Definition: MarbleDeclarativeWidget.cpp:90
Marble::ViewContext
ViewContext
This enum is used to choose context in which map quality gets used.
Definition: MarbleGlobal.h:72
Marble::LayerInterface
Definition: LayerInterface.h:25
Marble::MapQuality
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:80
MarbleWidget::centerOn
void centerOn(const Marble::GeoDataLatLonBox &bbox)
Definition: MarbleDeclarativeWidget.cpp:261
MarbleWidget::setProjection
void setProjection(const QString &projection)
Change the active projection.
Definition: MarbleDeclarativeWidget.cpp:202
QObject
MarbleWidget::projection
QString projection() const
Returns the active projection which can be either "Equirectangular", "Mercator" or "Spherical"...
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:102
MarbleWidget::renderPlugin
Marble::RenderPlugin * renderPlugin(const QString &name)
Definition: MarbleDeclarativeWidget.cpp:392
MarbleWidget::floatItem
Marble::AbstractFloatItem * floatItem(const QString &name)
Definition: MarbleDeclarativeWidget.cpp:424
MarbleWidget::visibleLatLonAltBoxChanged
void visibleLatLonAltBoxChanged()
Forwarded from MarbleWidget.
MarbleWidget::mouseClickGeoPosition
void mouseClickGeoPosition(qreal longitude, qreal latitude)
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:48
MarbleWidget::radiusChanged
void radiusChanged()
Marble::TextureLayer
Definition: TextureLayer.h:39
Marble::MarbleMap
A class that can paint a view of the earth.
Definition: MarbleMap.h:90
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QAbstractItemModel
MarbleWidget::setRadius
void setRadius(int radius)
Definition: MarbleDeclarativeWidget.cpp:368
MarbleWidget::projectionChanged
void projectionChanged()
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
marble_export.h
Marble::AngleUnit
AngleUnit
This enum is used to choose the unit chosen to measure angles.
Definition: MarbleGlobal.h:63
Marble::Projection
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:44
MarbleWidget::setMapThemeId
void setMapThemeId(const QString &mapThemeId)
Change the currently active map theme id.
Definition: MarbleDeclarativeWidget.cpp:182
MarbleWidget::floatItems
QList< QObject * > floatItems() const
MarbleWidget::model
Marble::MarbleModel * model()
Definition: MarbleDeclarativeWidget.cpp:85
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
Marble::GeoDataLatLonAltBox
A class that defines a 3D bounding box for geographic data.
Definition: GeoDataLatLonAltBox.h:49
MarbleWidget::renderPlugins
QList< QObject * > renderPlugins() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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