7 #ifndef MARBLE_MARBLEWIDGET_H
8 #define MARBLE_MARBLEWIDGET_H
20 #include "GeoDataCoordinates.h"
21 #include "MarbleGlobal.h"
22 #include "marble_export.h"
31 class AbstractDataPluginItem;
32 class AbstractFloatItem;
33 class GeoDataLatLonAltBox;
34 class GeoDataLatLonBox;
36 class GeoDataPlacemark;
39 class GeoSceneDocument;
42 class MarbleWidgetPopupMenu;
43 class MarbleWidgetInputHandler;
44 class MarbleWidgetPrivate;
49 class VectorTileLayer;
50 class TileCoordsPyramid;
102 Q_CLASSINFO(
"D-Bus Interface",
"org.kde.MarbleWidget")
105 Q_PROPERTY(
int zoom READ zoom WRITE setZoom)
107 Q_PROPERTY(
QString mapThemeId READ mapThemeId WRITE setMapThemeId)
108 Q_PROPERTY(
int projection READ projection WRITE
setProjection)
110 Q_PROPERTY(qreal longitude READ centerLongitude WRITE setCenterLongitude)
111 Q_PROPERTY(qreal latitude READ centerLatitude WRITE setCenterLatitude)
113 Q_PROPERTY(
bool showOverviewMap READ showOverviewMap WRITE setShowOverviewMap)
114 Q_PROPERTY(
bool showScaleBar READ showScaleBar WRITE setShowScaleBar)
115 Q_PROPERTY(
bool showCompass READ showCompass WRITE setShowCompass)
116 Q_PROPERTY(
bool showGrid READ showGrid WRITE setShowGrid)
118 Q_PROPERTY(
bool showClouds READ showClouds WRITE setShowClouds)
119 Q_PROPERTY(
bool showSunShading READ showSunShading WRITE setShowSunShading)
120 Q_PROPERTY(
bool showCityLights READ showCityLights WRITE setShowCityLights)
121 Q_PROPERTY(
bool isLockedToSubSolarPoint READ isLockedToSubSolarPoint WRITE setLockToSubSolarPoint)
122 Q_PROPERTY(
bool isSubSolarPointIconVisible READ isSubSolarPointIconVisible WRITE setSubSolarPointIconVisible)
123 Q_PROPERTY(
bool showAtmosphere READ showAtmosphere WRITE setShowAtmosphere)
124 Q_PROPERTY(
bool showCrosshairs READ showCrosshairs WRITE setShowCrosshairs)
126 Q_PROPERTY(
bool showPlaces READ showPlaces WRITE setShowPlaces)
127 Q_PROPERTY(
bool showCities READ showCities WRITE setShowCities)
128 Q_PROPERTY(
bool showTerrain READ showTerrain WRITE setShowTerrain)
129 Q_PROPERTY(
bool showOtherPlaces READ showOtherPlaces WRITE setShowOtherPlaces)
131 Q_PROPERTY(
bool showRelief READ showRelief WRITE setShowRelief)
133 Q_PROPERTY(
bool showIceLayer READ showIceLayer WRITE setShowIceLayer)
134 Q_PROPERTY(
bool showBorders READ showBorders WRITE setShowBorders)
135 Q_PROPERTY(
bool showRivers READ showRivers WRITE setShowRivers)
136 Q_PROPERTY(
bool showLakes READ showLakes WRITE setShowLakes)
138 Q_PROPERTY(
ViewContext viewContext READ viewContext WRITE setViewContext NOTIFY viewContextChanged)
140 Q_PROPERTY(
RenderStatus renderStatus READ renderStatus NOTIFY renderStatusChanged )
142 Q_PROPERTY(quint64 volatileTileCacheLimit READ volatileTileCacheLimit WRITE setVolatileTileCacheLimit)
175 MarbleWidgetInputHandler *inputHandler()
const;
180 void setInputHandler( MarbleWidgetInputHandler *handler );
208 void readPluginSettings(
QSettings& settings );
216 void writePluginSettings(
QSettings& settings )
const;
236 void addLayer( LayerInterface *layer );
241 void removeLayer( LayerInterface *layer );
250 const StyleBuilder* styleBuilder()
const;
292 int tileZoomLevel()
const;
297 qreal distance()
const;
302 QString distanceString()
const;
307 int minimumZoom()
const;
312 int maximumZoom()
const;
328 bool screenCoordinates( qreal lon, qreal lat,
329 qreal& x, qreal& y )
const;
341 bool geoCoordinates(
int x,
int y,
342 qreal& lon, qreal& lat,
349 qreal centerLongitude()
const;
355 qreal centerLatitude()
const;
357 qreal heading()
const;
363 qreal moveStep()
const;
368 GeoDataLookAt lookAt()
const;
389 void resetFocusPoint();
394 qreal radiusFromDistance( qreal distance )
const;
399 qreal distanceFromRadius( qreal radius )
const;
404 qreal zoomFromDistance( qreal distance )
const;
409 qreal distanceFromZoom( qreal zoom )
const;
427 bool showOverviewMap()
const;
433 bool showScaleBar()
const;
439 bool showCompass()
const;
445 bool showClouds()
const;
451 bool showSunShading()
const;
457 bool showCityLights()
const;
463 bool isLockedToSubSolarPoint()
const;
469 bool isSubSolarPointIconVisible()
const;
475 bool showAtmosphere()
const;
481 bool showCrosshairs()
const;
487 bool showGrid()
const;
493 bool showPlaces()
const;
499 bool showCities()
const;
505 bool showTerrain()
const;
511 bool showOtherPlaces()
const;
517 bool showRelief()
const;
523 bool showIceLayer()
const;
529 bool showBorders()
const;
535 bool showRivers()
const;
541 bool showLakes()
const;
547 bool showFrameRate()
const;
549 bool showBackground()
const;
559 bool animationsEnabled()
const;
562 void setDefaultAngleUnit(
AngleUnit angleUnit );
564 QFont defaultFont()
const;
565 void setDefaultFont(
const QFont& font );
576 quint64 volatileTileCacheLimit()
const;
604 RenderState renderState()
const;
609 void setHighlightEnabled(
bool enabled );
620 void setRadius(
int radius );
658 void setDistance( qreal distance );
672 void rotateBy(
const qreal deltaLon,
const qreal deltaLat,
FlyToMode mode =
Instant );
682 void centerOn(
const qreal lon,
const qreal lat,
bool animated =
false );
730 void setHeading( qreal heading );
794 void setMapThemeId(
const QString& maptheme );
804 void setPropertyValue(
const QString& name,
bool value );
810 void setShowOverviewMap(
bool visible );
816 void setShowScaleBar(
bool visible );
822 void setShowCompass(
bool visible );
828 void setShowClouds(
bool visible );
834 void setShowSunShading(
bool visible );
840 void setShowCityLights(
bool visible );
846 void setLockToSubSolarPoint(
bool visible );
852 void setSubSolarPointIconVisible(
bool visible );
858 void setShowAtmosphere(
bool visible );
864 void setShowCrosshairs(
bool visible );
870 void setShowGrid(
bool visible );
876 void setShowPlaces(
bool visible );
882 void setShowCities(
bool visible );
888 void setShowTerrain(
bool visible );
894 void setShowOtherPlaces(
bool visible );
900 void setShowRelief(
bool visible );
906 void setShowIceLayer(
bool visible );
912 void setShowBorders(
bool visible );
918 void setShowRivers(
bool visible );
924 void setShowLakes(
bool visible );
930 void setShowFrameRate(
bool visible );
932 void setShowBackground(
bool visible );
940 void setShowTileId(
bool visible );
946 void setShowRuntimeTrace(
bool visible );
948 bool showRuntimeTrace()
const;
955 void setShowDebugPolygons(
bool visible);
957 bool showDebugPolygons()
const;
964 void setShowDebugBatchRender(
bool visible);
966 bool showDebugBatchRender()
const;
973 void setShowDebugPlacemarks(
bool visible);
975 bool showDebugPlacemarks()
const;
981 void setDebugLevelTags(
bool visible);
983 bool debugLevelTags()
const;
989 void setLevelToDebug(
int level);
991 int levelToDebug()
const;
1009 void setAnimationsEnabled(
bool enabled );
1016 void clearVolatileTileCache();
1021 void setVolatileTileCacheLimit( quint64 kiloBytes );
1041 void creatingTilesStart( TileCreator *creator,
const QString& name,
const QString& description );
1058 void notifyMouseClick(
int x,
int y );
1060 void setSelection(
const QRect& region );
1062 void setInputEnabled(
bool );
1064 TextureLayer *textureLayer()
const;
1066 VectorTileLayer *vectorTileLayer()
const;
1076 void zoomChanged(
int zoom );
1077 void distanceChanged(
const QString& distanceString );
1079 void tileLevelChanged(
int level );
1081 void viewContextChanged(
ViewContext newViewContext);
1087 void themeChanged(
const QString& theme );
1091 void mouseMoveGeoPosition(
const QString& );
1095 void framesPerSecond( qreal fps );
1107 void pluginSettingsChanged();
1112 void renderPluginInitialized(
RenderPlugin *renderPlugin );
1126 void renderStateChanged(
const RenderState &state );
1130 void propertyValueChanged(
const QString& name,
bool value );
1136 void leaveEvent(
QEvent *event )
override;
1148 void connectNotify(
const QMetaMethod &signal)
override;
1149 void disconnectNotify(
const QMetaMethod &signal)
override;
1155 void changeEvent(
QEvent * event )
override;
1164 virtual void customPaint(
GeoPainter *painter );
1167 Q_PRIVATE_SLOT( d,
void updateMapTheme() )
1168 Q_PRIVATE_SLOT( d,
void updateSystemBackgroundAttribute() )
1172 MarbleWidgetPrivate *
const d;
1173 friend class MarbleWidgetPrivate;
1175 class CustomPaintLayer;
1176 friend class CustomPaintLayer;
1178 friend class MarbleWidgetDefaultInputHandler;