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

marble

  • sources
  • kde-4.14
  • 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 #include "RenderState.h"
34 
35 // Qt
36 class QAbstractItemModel;
37 class QItemSelectionModel;
38 
39 namespace Marble
40 {
41 
42 // MarbleMap
43 class MarbleMapPrivate;
44 
45 // Marble
46 class GeoDataLatLonAltBox;
47 class GeoDataPlacemark;
48 class MarbleModel;
49 class ViewportParams;
50 class GeoPainter;
51 class LayerInterface;
52 class Quaternion;
53 class RenderPlugin;
54 class AbstractDataPlugin;
55 class AbstractDataPluginItem;
56 class AbstractFloatItem;
57 class TextureLayer;
58 class TileCoordsPyramid;
59 
91 class MARBLE_EXPORT MarbleMap : public QObject
92 {
93  Q_OBJECT
94  Q_CLASSINFO("D-Bus Interface", "org.kde.MarbleMap")
95 
96  public:
97 
98  friend class MarbleWidget;
99 
107  MarbleMap();
108 
117  explicit MarbleMap( MarbleModel *model );
118 
119  virtual ~MarbleMap();
120 
124  MarbleModel *model() const;
125 
126  // Accessors to internal objects;
127  ViewportParams *viewport();
128  const ViewportParams *viewport() const;
129 
136  Projection projection() const;
137 
147  QString mapThemeId() const;
148 
149  void setMapQualityForViewContext( MapQuality qualityForViewContext, ViewContext viewContext );
150  MapQuality mapQuality( ViewContext viewContext ) const;
151 
155  MapQuality mapQuality() const;
156 
157  void setViewContext( ViewContext viewContext );
158  ViewContext viewContext() const;
159 
160  void setSize( int width, int height );
161  void setSize( const QSize& size );
162  QSize size() const;
163  int width() const;
164  int height() const;
165 
169  int radius() const;
170 
171  int preferredRadiusCeil( int radius );
172  int preferredRadiusFloor( int radius );
173 
174  int tileZoomLevel() const;
175 
179  int minimumZoom() const;
180 
184  int maximumZoom() const;
185 
195  bool screenCoordinates( qreal lon, qreal lat,
196  qreal& x, qreal& y ) const;
197 
207  bool geoCoordinates( int x, int y,
208  qreal& lon, qreal& lat,
209  GeoDataCoordinates::Unit = GeoDataCoordinates::Degree ) const;
210 
215  qreal centerLongitude() const;
216 
221  qreal centerLatitude() const;
222 
223  QVector<const GeoDataPlacemark*> whichFeatureAt( const QPoint& ) const;
224 
229  bool propertyValue( const QString& name ) const;
230 
235  bool showOverviewMap() const;
236 
241  bool showScaleBar() const;
242 
247  bool showCompass() const;
248 
253  bool showClouds() const;
254 
259  bool showSunShading() const;
260 
265  bool showCityLights() const;
266 
271  bool isLockedToSubSolarPoint() const;
272 
277  bool isSubSolarPointIconVisible() const;
278 
283  bool showAtmosphere() const;
284 
289  bool showCrosshairs() const;
290 
295  bool showGrid() const;
296 
301  bool showPlaces() const;
302 
307  bool showCities() const;
308 
313  bool showTerrain() const;
314 
319  bool showOtherPlaces() const;
320 
325  bool showRelief() const;
326 
331  bool showIceLayer() const;
332 
337  bool showBorders() const;
338 
343  bool showRivers() const;
344 
349  bool showLakes() const;
350 
355  bool showFrameRate() const;
356 
357  bool showBackground() const;
358 
363  quint64 volatileTileCacheLimit() const;
364 
369  QList<RenderPlugin *> renderPlugins() const;
370  QList<AbstractFloatItem *> floatItems() const;
371 
376  AbstractFloatItem * floatItem( const QString &nameId ) const;
377 
382  QList<AbstractDataPlugin *> dataPlugins() const;
383 
387  QList<AbstractDataPluginItem *> whichItemAt( const QPoint& curpos ) const;
388 
389  AngleUnit defaultAngleUnit() const;
390 
391  QFont defaultFont() const;
392 
393  TextureLayer *textureLayer() const;
394 
398  void addLayer( LayerInterface *layer );
399 
403  void removeLayer( LayerInterface *layer );
404 
405  RenderStatus renderStatus() const;
406 
407  RenderState renderState() const;
408 
409  public Q_SLOTS:
410 
416  void paint( GeoPainter &painter, const QRect &dirtyRect );
417 
422  void setRadius( int radius );
423 
435  void rotateBy( const qreal &deltaLon, const qreal &deltaLat );
436 
444  void centerOn( const qreal lon, const qreal lat );
445 
450  void setCenterLatitude( qreal lat );
451 
456  void setCenterLongitude( qreal lon );
457 
462  void setProjection( Projection projection );
463 
473  void setMapThemeId( const QString& maptheme );
474 
482  void setPropertyValue( const QString& name, bool value );
483 
488  void setShowOverviewMap( bool visible );
489 
494  void setShowScaleBar( bool visible );
495 
500  void setShowCompass( bool visible );
501 
506  void setShowClouds( bool visible );
507 
512  void setShowSunShading( bool visible );
513 
518  void setShowCityLights( bool visible );
519 
524  void setLockToSubSolarPoint( bool visible );
525 
530  void setSubSolarPointIconVisible( bool visible );
531 
538  void setShowTileId( bool visible );
539 
544  void setShowAtmosphere( bool visible );
545 
550  void setShowCrosshairs( bool visible );
551 
556  void setShowGrid( bool visible );
557 
562  void setShowPlaces( bool visible );
563 
568  void setShowCities( bool visible );
569 
574  void setShowTerrain( bool visible );
575 
580  void setShowOtherPlaces( bool visible );
581 
586  void setShowRelief( bool visible );
587 
592  void setShowIceLayer( bool visible );
593 
598  void setShowBorders( bool visible );
599 
604  void setShowRivers( bool visible );
605 
610  void setShowLakes( bool visible );
611 
616  void setShowFrameRate( bool visible );
617 
618  void setShowRuntimeTrace( bool visible );
619 
620  void setShowBackground( bool visible );
621 
625  void notifyMouseClick( int x, int y );
626 
627  void clearVolatileTileCache();
632  void setVolatileTileCacheLimit( quint64 kiloBytes );
633 
634  void setDefaultAngleUnit( AngleUnit angleUnit );
635 
636  void setDefaultFont( const QFont& font );
637 
643  void reload();
644 
645  void downloadRegion( QVector<TileCoordsPyramid> const & );
646 
647  Q_SIGNALS:
648  void tileLevelChanged( int level );
649 
654  void themeChanged( const QString& theme );
655 
656  void projectionChanged( Projection );
657 
658  void radiusChanged( int radius );
659 
660  void mouseMoveGeoPosition( const QString& );
661 
662  void mouseClickGeoPosition( qreal lon, qreal lat, GeoDataCoordinates::Unit );
663 
664  void framesPerSecond( qreal fps );
665 
671  void repaintNeeded( const QRegion& dirtyRegion = QRegion() );
672 
677  void visibleLatLonAltBoxChanged( const GeoDataLatLonAltBox& visibleLatLonAltBox );
678 
682  void pluginSettingsChanged();
683 
687  void renderPluginInitialized( RenderPlugin *renderPlugin );
688 
693  void renderStatusChanged( RenderStatus status );
694 
695  void renderStateChanged( const RenderState &state );
696 
697  protected:
698 
706  virtual void customPaint( GeoPainter *painter );
707 
708  private:
709  Q_PRIVATE_SLOT( d, void updateMapTheme() )
710  Q_PRIVATE_SLOT( d, void updateProperty( const QString &, bool ) )
711  Q_PRIVATE_SLOT( d, void setDocument(QString) )
712 
713  private:
714  Q_DISABLE_COPY( MarbleMap )
715  MarbleMapPrivate * const d;
716  friend class MarbleMapPrivate;
717 
718  class CustomPaintLayer;
719  friend class CustomPaintLayer;
720 };
721 
722 }
723 
724 #endif
Marble::GeoDataCoordinates::Unit
Unit
enum used constructor to specify the units used
Definition: GeoDataCoordinates.h:64
GeoDataCoordinates.h
QGraphicsItem::x
qreal x() const
QGraphicsItem::y
qreal y() const
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:91
QFont
Marble::ViewContext
ViewContext
This enum is used to choose context in which map quality gets used.
Definition: MarbleGlobal.h:74
QGraphicsObject::visible
visible
Marble::LayerInterface
Definition: LayerInterface.h:26
Marble::MapQuality
MapQuality
This enum is used to choose the map quality shown in the view.
Definition: MarbleGlobal.h:82
QPoint
MarbleWidget::centerOn
void centerOn(const Marble::GeoDataLatLonBox &bbox)
Definition: MarbleDeclarativeWidget.cpp:262
MarbleWidget::setProjection
void setProjection(const QString &projection)
Change the active projection.
Definition: MarbleDeclarativeWidget.cpp:203
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:104
QGraphicsWidget::size
QSizeF size() const
QGraphicsWidget::font
QFont font() const
MarbleWidget::renderPlugin
Marble::RenderPlugin * renderPlugin(const QString &name)
Definition: MarbleDeclarativeWidget.cpp:394
QObject::name
const char * name() const
QRect
MarbleWidget::floatItem
Marble::AbstractFloatItem * floatItem(const QString &name)
Definition: MarbleDeclarativeWidget.cpp:426
MarbleWidget::visibleLatLonAltBoxChanged
void visibleLatLonAltBoxChanged()
Forwarded from MarbleWidget.
MarbleWidget::mouseClickGeoPosition
void mouseClickGeoPosition(qreal longitude, qreal latitude)
RenderState.h
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::AbstractFloatItem
The abstract class for float item plugins.
Definition: AbstractFloatItem.h:45
Marble::radius
static qreal radius(qreal zoom)
Definition: thumbnailer.cpp:99
MarbleWidget::radiusChanged
void radiusChanged()
Marble::TextureLayer
Definition: TextureLayer.h:38
QString
QList
Marble::RenderStatus
RenderStatus
Definition: MarbleGlobal.h:191
Marble::RenderState
Definition: RenderState.h:22
Marble::MarbleMap
A class that can paint a view of the earth.
Definition: MarbleMap.h:91
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QSize
MarbleWidget::setRadius
void setRadius(int radius)
Definition: MarbleDeclarativeWidget.cpp:370
MarbleWidget::projectionChanged
void projectionChanged()
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QVector
marble_export.h
Marble::AngleUnit
AngleUnit
This enum is used to choose the unit chosen to measure angles.
Definition: MarbleGlobal.h:65
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:183
QAbstractItemModel
MarbleWidget::floatItems
QList< QObject * > floatItems() const
MarbleWidget::model
Marble::MarbleModel * model()
Definition: MarbleDeclarativeWidget.cpp:86
QItemSelectionModel
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
QRegion
QGraphicsProxyWidget::paint
virtual void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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
  • 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