File indexing completed on 2024-04-21 03:49:44

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2006-2008 Torsten Rahn <tackat@kde.org>
0004 // SPDX-FileCopyrightText: 2007 Inge Wallin <ingwa@kde.org>
0005 // SPDX-FileCopyrightText: 2009 Jens-Michael Hoffmann <jensmh@gmx.de>
0006 //
0007 
0008 #ifndef MARBLE_MARBLEMAP_H
0009 #define MARBLE_MARBLEMAP_H
0010 
0011 
0012 /** @file
0013  * This file contains the headers for MarbleMap.
0014  *
0015  * @author Torsten Rahn <tackat@kde.org>
0016  * @author Inge Wallin  <inge@lysator.liu.se>
0017  */
0018 
0019 
0020 #include "marble_export.h"
0021 #include "GeoDataCoordinates.h"       // In geodata/data/
0022 #include "GeoDataRelation.h"
0023 
0024 // Qt
0025 #include <QObject>
0026 #include <QRegion>
0027 
0028 class QFont;
0029 class QString;
0030 
0031 namespace Marble
0032 {
0033 
0034 // MarbleMap 
0035 class MarbleMapPrivate;
0036 
0037 // Marble
0038 class GeoDataLatLonAltBox;
0039 class GeoDataFeature;
0040 class MarbleModel;
0041 class ViewportParams;
0042 class GeoPainter;
0043 class LayerInterface;
0044 class RenderPlugin;
0045 class RenderState;
0046 class AbstractDataPlugin;
0047 class AbstractDataPluginItem;
0048 class AbstractFloatItem;
0049 class TextureLayer;
0050 class VectorTileLayer;
0051 class TileCoordsPyramid;
0052 class GeoSceneTextureTileDataset;
0053 class StyleBuilder;
0054 
0055 /**
0056  * @short A class that can paint a view of the earth.
0057  *
0058  * FIXME: Change this description when we are done.
0059  *
0060  * This class can paint a view of the earth or any other globe,
0061  * depending on which dataset is used. It can be used to show the
0062  * globe in a widget like MarbleWidget does, or on any other
0063  * QPaintDevice.
0064  *
0065  * The projection and other view parameters that control how MarbleMap
0066  * paints the map is given through the class ViewParams. If the
0067  * programmer wants to allow the user to control the map, he/she has
0068  * to provide a way for the user to interact with it.  An example of
0069  * this can be seen in the class MarbleWidgetInputHandler, that lets
0070  * the user control a MarbleWidget that uses MarbleMap internally.
0071  *
0072  * The MarbleMap needs to be provided with a data model to
0073  * work. This model is contained in the MarbleModel class. The widget
0074  * can also construct its own model if none is given to the
0075  * constructor.  This data model contains 3 separate datatypes:
0076  * <b>tiles</b> which provide the background, <b>vectors</b> which
0077  * provide things like country borders and coastlines and
0078  * <b>placemarks</b> which can show points of interest, such as
0079  * cities, mountain tops or the poles.
0080  *
0081  * @see MarbleWidget
0082  * @see MarbleModel
0083  */
0084 
0085 class MARBLE_EXPORT MarbleMap : public QObject
0086 {
0087     Q_OBJECT
0088     Q_CLASSINFO("D-Bus Interface", "org.kde.MarbleMap")
0089 
0090  public:
0091 
0092     friend class MarbleWidget;
0093 
0094     /**
0095      * @brief Construct a new MarbleMap.
0096      *
0097      * This constructor should be used when you will only use one
0098      * MarbleMap.  The widget will create its own MarbleModel when
0099      * created.
0100      */
0101     MarbleMap();
0102 
0103     /**
0104      * @brief Construct a new MarbleMap.
0105      * @param model  the data model for the widget.
0106      *
0107      * This constructor should be used when you plan to use more than
0108      * one MarbleMap for the same MarbleModel (not yet supported,
0109      * but will be soon).
0110      */
0111     explicit MarbleMap( MarbleModel *model );
0112 
0113     ~MarbleMap() override;
0114 
0115     /**
0116      * @brief Return the model that this view shows.
0117      */
0118     MarbleModel *model() const;
0119 
0120     // Accessors to internal objects;
0121     ViewportParams *viewport();
0122     const ViewportParams *viewport() const;
0123 
0124     /**
0125      * @brief  Get the Projection used for the map
0126      * @return @c Spherical         a Globe
0127      * @return @c Equirectangular   a flat map
0128      * @return @c Mercator          another flat map
0129      */
0130     Projection projection() const;
0131 
0132     /**
0133      * @brief Get the ID of the current map theme
0134      * To ensure that a unique identifier is being used the theme does NOT
0135      * get represented by its name but the by relative location of the file
0136      * that specifies the theme:
0137      *
0138      * Example:
0139      *    maptheme = "earth/bluemarble/bluemarble.dgml"
0140      */
0141     QString mapThemeId() const;
0142 
0143     void setMapQualityForViewContext( MapQuality qualityForViewContext, ViewContext viewContext );
0144     MapQuality mapQuality( ViewContext viewContext ) const;
0145 
0146     /**
0147      * @brief Return the current map quality.
0148      */
0149     MapQuality mapQuality() const;
0150 
0151     void setViewContext( ViewContext viewContext );
0152     ViewContext viewContext() const;
0153 
0154     void setSize( int width, int height );
0155     void setSize( const QSize& size );
0156     QSize size() const;
0157     int width() const;
0158     int height() const;
0159 
0160     /**
0161      * @brief  Return the radius of the globe in pixels.
0162      */
0163     int radius() const;
0164 
0165     int preferredRadiusCeil(int radius) const;
0166     int preferredRadiusFloor(int radius) const;
0167 
0168     int tileZoomLevel() const;
0169 
0170     /**
0171      * @brief return the minimum zoom value for the current map theme.
0172      */
0173     int minimumZoom() const;
0174 
0175     /**
0176      * @brief return the minimum zoom value for the current map theme.
0177      */
0178     int maximumZoom() const;
0179 
0180     bool discreteZoom() const;
0181 
0182     /**
0183      * @brief Get the screen coordinates corresponding to geographical coordinates in the map.
0184      * @param lon    the lon coordinate of the requested pixel position
0185      * @param lat    the lat coordinate of the requested pixel position
0186      * @param x      the x coordinate of the pixel is returned through this parameter
0187      * @param y      the y coordinate of the pixel is returned through this parameter
0188      * @return @c true  if the geographical coordinates are visible on the screen
0189      *         @c false if the geographical coordinates are not visible on the screen
0190      */
0191     bool screenCoordinates( qreal lon, qreal lat,
0192                             qreal& x, qreal& y ) const;
0193 
0194     /**
0195      * @brief Get the earth coordinates corresponding to a pixel in the map.
0196      * @param x      the x coordinate of the pixel
0197      * @param y      the y coordinate of the pixel
0198      * @param lon    the longitude angle is returned through this parameter
0199      * @param lat    the latitude angle is returned through this parameter
0200      * @param unit   the angle units
0201      * @return @c true  if the pixel (x, y) is within the globe
0202      *         @c false if the pixel (x, y) is outside the globe, i.e. in space.
0203      */
0204     bool geoCoordinates( int x, int y,
0205                          qreal& lon, qreal& lat,
0206                          GeoDataCoordinates::Unit = GeoDataCoordinates::Degree ) const;
0207 
0208     /**
0209      * @brief Return the longitude of the center point.
0210      * @return The longitude of the center point in degree.
0211      */
0212     qreal centerLongitude() const;
0213 
0214     /**
0215      * @brief Return the latitude of the center point.
0216      * @return The latitude of the center point in degree.
0217      */
0218     qreal centerLatitude() const;
0219 
0220     qreal heading() const;
0221 
0222     /**
0223      * @since 0.26.0
0224      */
0225     bool hasFeatureAt(const QPoint&) const;
0226 
0227     QVector<const GeoDataFeature *> whichFeatureAt( const QPoint& ) const;
0228 
0229     /**
0230      * @brief  Return the property value by name.
0231      * @return The property value (usually: visibility).
0232      */
0233     bool propertyValue( const QString& name ) const;
0234 
0235     /**
0236      * @brief  Return whether the overview map is visible.
0237      * @return The overview map visibility.
0238      */
0239     bool showOverviewMap() const;
0240 
0241     /**
0242      * @brief  Return whether the scale bar is visible.
0243      * @return The scale bar visibility.
0244      */
0245     bool showScaleBar() const;
0246 
0247     /**
0248      * @brief  Return whether the compass bar is visible.
0249      * @return The compass visibility.
0250      */
0251     bool showCompass() const;
0252 
0253     /**
0254      * @brief  Return whether the cloud cover is visible.
0255      * @return The cloud cover visibility.
0256      */
0257     bool showClouds() const;
0258 
0259     /**
0260      * @brief  Return whether the night shadow is visible.
0261      * @return visibility of night shadow
0262      */
0263     bool showSunShading() const;
0264 
0265     /**
0266      * @brief  Return whether the city lights are shown instead of the night shadow.
0267      * @return visibility of city lights
0268      */
0269     bool showCityLights() const;
0270 
0271     /**
0272      * @brief  Return whether the globe is locked to the sub solar point
0273      * @return if globe is locked to sub solar point
0274      */
0275     bool isLockedToSubSolarPoint() const;
0276 
0277     /**
0278      * @brief  Return whether the sun icon is shown in the sub solar point.
0279      * @return visibility of the sun icon in the sub solar point
0280      */
0281     bool isSubSolarPointIconVisible() const;
0282 
0283     /**
0284      * @brief  Return whether the atmospheric glow is visible.
0285      * @return The cloud cover visibility.
0286      */
0287     bool showAtmosphere() const;
0288 
0289     /**
0290      * @brief  Return whether the crosshairs are visible.
0291      * @return The crosshairs' visibility.
0292      */
0293     bool showCrosshairs() const;
0294 
0295     /**
0296      * @brief  Return whether the coordinate grid is visible.
0297      * @return The coordinate grid visibility.
0298      */
0299     bool showGrid() const;
0300 
0301     /**
0302      * @brief  Return whether the place marks are visible.
0303      * @return The place mark visibility.
0304      */
0305     bool showPlaces() const;
0306 
0307     /**
0308      * @brief  Return whether the city place marks are visible.
0309      * @return The city place mark visibility.
0310      */
0311     bool showCities() const;
0312 
0313     /**
0314      * @brief  Return whether the terrain place marks are visible.
0315      * @return The terrain place mark visibility.
0316      */
0317     bool showTerrain() const;
0318 
0319     /**
0320      * @brief  Return whether other places are visible.
0321      * @return The visibility of other places.
0322      */
0323     bool showOtherPlaces() const;
0324 
0325     /**
0326      * @brief  Return whether the relief is visible.
0327      * @return The relief visibility.
0328      */
0329     bool showRelief() const;
0330 
0331     /**
0332      * @brief  Return whether the ice layer is visible.
0333      * @return The ice layer visibility.
0334      */
0335     bool showIceLayer() const;
0336 
0337     /**
0338      * @brief  Return whether the borders are visible.
0339      * @return The border visibility.
0340      */
0341     bool showBorders() const;
0342 
0343     /**
0344      * @brief  Return whether the rivers are visible.
0345      * @return The rivers' visibility.
0346      */
0347     bool showRivers() const;
0348 
0349     /**
0350      * @brief  Return whether the lakes are visible.
0351      * @return The lakes' visibility.
0352      */
0353     bool showLakes() const;
0354 
0355     /**
0356      * @brief  Return whether the frame rate gets displayed.
0357      * @return the frame rates visibility
0358      */
0359     bool showFrameRate() const;
0360 
0361     bool showBackground() const;
0362 
0363     GeoDataRelation::RelationTypes visibleRelationTypes() const;
0364 
0365     /**
0366      * @brief  Returns the limit in kilobytes of the volatile (in RAM) tile cache.
0367      * @return the limit of volatile tile cache in kilobytes.
0368      */
0369     quint64 volatileTileCacheLimit() const;
0370 
0371     /**
0372      * @brief Returns a list of all RenderPlugins in the model, this includes float items
0373      * @return the list of RenderPlugins
0374      */
0375     QList<RenderPlugin *> renderPlugins() const;
0376     QList<AbstractFloatItem *> floatItems() const;
0377 
0378     /**
0379      * @brief Returns a list of all FloatItems in the model
0380      * @return the list of the floatItems
0381      */
0382     AbstractFloatItem * floatItem( const QString &nameId ) const;
0383 
0384     /**
0385      * @brief Returns a list of all DataPlugins on the layer
0386      * @return the list of DataPlugins
0387      */
0388     QList<AbstractDataPlugin *> dataPlugins()  const;
0389 
0390     /**
0391      * @brief Returns all widgets of dataPlugins on the position curpos
0392      */
0393     QList<AbstractDataPluginItem *> whichItemAt( const QPoint& curpos ) const;
0394 
0395     AngleUnit defaultAngleUnit() const;
0396 
0397     QFont defaultFont() const;
0398 
0399     TextureLayer *textureLayer() const;
0400     VectorTileLayer * vectorTileLayer() const;
0401 
0402     /**
0403      * @brief Add a layer to be included in rendering.
0404      */
0405     void addLayer( LayerInterface *layer );
0406 
0407     /**
0408      * @brief Adds a texture sublayer
0409      * @return Returns a key that identifies the texture sublayer
0410      */
0411     QString addTextureLayer(GeoSceneTextureTileDataset *texture);
0412 
0413     /**
0414      * @brief Removes a texture sublayer
0415      * @param key a key that was returned from corresponding addTextureLayer
0416      */
0417     void removeTextureLayer(const QString &key);
0418 
0419     /**
0420      * @brief Remove a layer from being included in rendering.
0421      */
0422     void removeLayer( LayerInterface *layer );
0423 
0424     RenderStatus renderStatus() const;
0425 
0426     RenderState renderState() const;
0427 
0428     /**
0429      * @since 0.26.0
0430      */
0431     const StyleBuilder* styleBuilder() const;
0432 
0433  public Q_SLOTS:
0434 
0435     /**
0436      * @brief Paint the map using a give painter.
0437      * @param painter  The painter to use.
0438      * @param dirtyRect the rectangle that actually needs repainting.
0439      */
0440     void paint( GeoPainter &painter, const QRect &dirtyRect );
0441 
0442     /**
0443      * @brief  Set the radius of the globe in pixels.
0444      * @param  radius  The new globe radius value in pixels.
0445      */
0446     void setRadius( int radius );
0447 
0448     void setHeading( qreal heading );
0449 
0450     /**
0451      * @brief  Rotate the view by the two angles phi and theta.
0452      * @param  deltaLon  an angle that specifies the change in terms of longitude
0453      * @param  deltaLat  an angle that specifies the change in terms of latitude
0454      *
0455      * This function rotates the view by two angles,
0456      * deltaLon ("theta") and deltaLat ("phi").
0457      * If we start at (0, 0), the result will be the exact equivalent
0458      * of (lon, lat), otherwise the resulting angle will be the sum of
0459      * the previous position and the two offsets.
0460      */
0461     void rotateBy(qreal deltaLon, qreal deltaLat);
0462 
0463     /**
0464      * @brief  Center the view on a geographical point
0465      * @param  lat  an angle parallel to the latitude lines
0466      *              +90(N) - -90(S)
0467      * @param  lon  an angle parallel to the longitude lines
0468      *              +180(W) - -180(E)
0469      */
0470     void centerOn( const qreal lon, const qreal lat );
0471 
0472     /**
0473      * @brief  Set the latitude for the center point
0474      * @param  lat  the new value for the latitude in degree
0475      */
0476     void setCenterLatitude( qreal lat );
0477 
0478     /**
0479      * @brief  Set the longitude for the center point
0480      * @param  lon  the new value for the longitude in degree
0481      */
0482     void setCenterLongitude( qreal lon );
0483 
0484     /**
0485      * @brief  Set the Projection used for the map
0486      * @param  projection projection type (e.g. Spherical, Equirectangular, Mercator)
0487      */
0488     void setProjection( Projection projection );
0489 
0490     /**
0491      * @brief Set a new map theme
0492      * @param maptheme  The ID of the new maptheme. To ensure that a unique 
0493      * identifier is being used the theme does NOT get represented by its 
0494      * name but the by relative location of the file that specifies the theme:
0495      *
0496      * Example: 
0497      *    maptheme = "earth/bluemarble/bluemarble.dgml" 
0498      */
0499     void setMapThemeId( const QString& maptheme );
0500 
0501     /**
0502      * @brief  Sets the value of a map theme property
0503      * @param  name   name of the property
0504      * @param  value  value of the property (usually: visibility)
0505      * 
0506      * Later on we might add a "setPropertyType and a QVariant
0507      * if needed.
0508      */
0509     void setPropertyValue( const QString& name, bool value );
0510 
0511     /**
0512      * @brief  Set whether the overview map overlay is visible
0513      * @param  visible  visibility of the overview map
0514      */
0515     void setShowOverviewMap( bool visible );
0516 
0517     /**
0518      * @brief  Set whether the scale bar overlay is visible
0519      * @param  visible  visibility of the scale bar
0520      */
0521     void setShowScaleBar( bool visible );
0522 
0523     /**
0524      * @brief  Set whether the compass overlay is visible
0525      * @param  visible  visibility of the compass
0526      */
0527     void setShowCompass( bool visible );
0528 
0529     /**
0530      * @brief  Set whether the cloud cover is visible
0531      * @param  visible  visibility of the cloud cover
0532      */
0533     void setShowClouds( bool visible );
0534 
0535     /**
0536      * @brief  Set whether the night shadow is visible.
0537      * @param  visible visibility of shadow
0538      */
0539     void setShowSunShading( bool visible );
0540 
0541     /**
0542      * @brief  Set whether city lights instead of night shadow are visible.
0543      * @param  visible visibility of city lights
0544      */
0545     void setShowCityLights( bool visible );
0546 
0547     /**
0548      * @brief  Set the globe locked to the sub solar point
0549      * @param  visible if globe is locked to the sub solar point
0550      */
0551     void setLockToSubSolarPoint( bool visible );
0552 
0553     /**
0554      * @brief  Set whether the sun icon is shown in the sub solar point
0555      * @param  visible if the sun icon is shown in the sub solar point
0556      */
0557     void setSubSolarPointIconVisible( bool visible );
0558 
0559     /**
0560      * @brief Set whether the is tile is visible
0561      * NOTE: This is part of the transitional debug API
0562      *       and might be subject to changes until Marble 0.8
0563      * @param visible visibility of the tile
0564      */ 
0565     void setShowTileId( bool visible );
0566 
0567     /**
0568      * @brief  Set whether the atmospheric glow is visible
0569      * @param  visible  visibility of the atmospheric glow
0570      */
0571     void setShowAtmosphere( bool visible );
0572 
0573     /**
0574      * @brief  Set whether the crosshairs are visible
0575      * @param  visible  visibility of the crosshairs
0576      */
0577     void setShowCrosshairs( bool visible );
0578 
0579     /**
0580      * @brief  Set whether the coordinate grid overlay is visible
0581      * @param  visible  visibility of the coordinate grid
0582      */
0583     void setShowGrid( bool visible );
0584 
0585     /**
0586      * @brief  Set whether the place mark overlay is visible
0587      * @param  visible  visibility of the place marks
0588      */
0589     void setShowPlaces( bool visible );
0590 
0591     /**
0592      * @brief  Set whether the city place mark overlay is visible
0593      * @param  visible  visibility of the city place marks
0594      */
0595     void setShowCities( bool visible );
0596 
0597     /**
0598      * @brief  Set whether the terrain place mark overlay is visible
0599      * @param  visible  visibility of the terrain place marks
0600      */
0601     void setShowTerrain( bool visible );
0602 
0603     /**
0604      * @brief  Set whether the other places overlay is visible
0605      * @param  visible  visibility of other places
0606      */
0607     void setShowOtherPlaces( bool visible );
0608 
0609     /**
0610      * @brief  Set whether the relief is visible
0611      * @param  visible  visibility of the relief
0612      */
0613     void setShowRelief( bool visible );
0614 
0615     /**
0616      * @brief  Set whether the ice layer is visible
0617      * @param  visible  visibility of the ice layer
0618      */
0619     void setShowIceLayer( bool visible );
0620 
0621     /**
0622      * @brief  Set whether the borders visible
0623      * @param  visible  visibility of the borders
0624      */
0625     void setShowBorders( bool visible );
0626 
0627     /**
0628      * @brief  Set whether the rivers are visible
0629      * @param  visible  visibility of the rivers
0630      */
0631     void setShowRivers( bool visible );
0632 
0633     /**
0634      * @brief  Set whether the lakes are visible
0635      * @param  visible  visibility of the lakes
0636      */
0637     void setShowLakes( bool visible );
0638 
0639     /**
0640      * @brief Set whether the frame rate gets shown
0641      * @param visible  visibility of the frame rate
0642      */
0643     void setShowFrameRate( bool visible );
0644 
0645     void setShowRuntimeTrace( bool visible );
0646 
0647     bool showRuntimeTrace() const;
0648 
0649     /**
0650      * @brief Set whether to enter the debug mode for
0651      * polygon node drawing
0652      * @param visible visibility of the node debug mode
0653      */
0654     void setShowDebugPolygons( bool visible);
0655 
0656     bool showDebugPolygons() const;
0657 
0658     /**
0659      * @brief Set whether to enter the debug mode for
0660      * visualizing batch rendering
0661      * @param visible visibility of the batch rendering
0662      */
0663     void setShowDebugBatchRender( bool visible);
0664 
0665     bool showDebugBatchRender() const;
0666 
0667 
0668     /**
0669      * @brief Set whether to enter the debug mode for
0670      * placemark drawing
0671      * @param visible visibility of the node debug mode
0672      */
0673     void setShowDebugPlacemarks(bool visible);
0674 
0675     bool showDebugPlacemarks() const;
0676 
0677 
0678     /**
0679      * @brief Set whether to enter the debug mode for
0680      * level tags
0681      * @param visible visibility according to OSM level tags
0682      */
0683     void setLevelTagDebugModeEnabled(bool visible);
0684 
0685     bool levelTagDebugModeEnabled() const;
0686 
0687     void setDebugLevelTag(int level);
0688 
0689     int debugLevelTag() const;
0690 
0691 
0692     void setShowBackground( bool visible );
0693 
0694     void setVisibleRelationTypes(GeoDataRelation::RelationTypes relationTypes);
0695 
0696      /**
0697      * @brief used to notify about the position of the mouse click
0698       */
0699     void notifyMouseClick( int x, int y );
0700 
0701     void clearVolatileTileCache();
0702     /**
0703      * @brief  Set the limit of the volatile (in RAM) tile cache.
0704      * @param  kiloBytes The limit in kilobytes.
0705      */
0706     void setVolatileTileCacheLimit( quint64 kiloBytes );
0707 
0708     void setDefaultAngleUnit( AngleUnit angleUnit );
0709 
0710     void setDefaultFont( const QFont& font );
0711 
0712     /**
0713      * @brief Reload the currently displayed map by reloading texture tiles
0714      *        from the Internet. In the future this should be extended to all
0715      *        kinds of data which is used in the map.
0716      */
0717     void reload();
0718 
0719     void downloadRegion( QVector<TileCoordsPyramid> const & );
0720 
0721     void highlightRouteRelation(qint64 osmId, bool enabled);
0722 
0723  Q_SIGNALS:
0724     void tileLevelChanged( int level );
0725 
0726     /**
0727      * @brief Signal that the theme has changed
0728      * @param theme  Name of the new theme.
0729      */
0730     void themeChanged( const QString& theme );
0731 
0732     void projectionChanged( Projection );
0733 
0734     void radiusChanged( int radius );
0735 
0736     void mouseMoveGeoPosition( const QString& geoPositionString);
0737 
0738     void mouseClickGeoPosition( qreal lon, qreal lat, GeoDataCoordinates::Unit );
0739 
0740     void framesPerSecond( qreal fps );
0741 
0742     /**
0743      * This signal is emitted when the repaint of the view was requested.
0744      * If available with the @p dirtyRegion which is the region the view will change in.
0745      * If dirtyRegion.isEmpty() returns true, the whole viewport has to be repainted.
0746      */
0747     void repaintNeeded( const QRegion& dirtyRegion = QRegion() );
0748 
0749     /**
0750      * This signal is emitted when the visible region of the map changes. This typically happens
0751      * when the user moves the map around or zooms.
0752      */
0753     void visibleLatLonAltBoxChanged( const GeoDataLatLonAltBox& visibleLatLonAltBox );
0754 
0755     /**
0756      * @brief This signal is emit when the settings of a plugin changed.
0757      */
0758     void pluginSettingsChanged();
0759 
0760     /**
0761      * @brief Signal that a render item has been initialized
0762      */
0763     void renderPluginInitialized( RenderPlugin *renderPlugin );
0764 
0765     /**
0766      * @brief Emitted when the layer rendering status has changed
0767      * @param status New render status
0768      */
0769     void renderStatusChanged( RenderStatus status );
0770 
0771     void renderStateChanged( const RenderState &state );
0772 
0773     void highlightedPlacemarksChanged( qreal, qreal, GeoDataCoordinates::Unit );
0774 
0775     void viewContextChanged(ViewContext viewContext);
0776 
0777     void visibleRelationTypesChanged(GeoDataRelation::RelationTypes relationTypes);
0778 
0779     void propertyValueChanged( const QString& name, bool value );
0780 
0781  protected:
0782 
0783     /**
0784      * @brief Enables custom drawing onto the MarbleMap straight after
0785      * @brief the globe and before all other layers have been rendered.
0786      * @param painter
0787      *
0788      * @deprecated implement LayerInterface and add it using @p addLayer()
0789      */
0790     virtual void customPaint( GeoPainter *painter );
0791 
0792  private:
0793     Q_PRIVATE_SLOT( d, void updateMapTheme() )
0794     Q_PRIVATE_SLOT( d, void updateProperty( const QString &, bool ) )
0795     Q_PRIVATE_SLOT( d, void setDocument(QString) )
0796     Q_PRIVATE_SLOT( d, void updateTileLevel() )
0797     Q_PRIVATE_SLOT(d, void addPlugins())
0798 
0799  private:
0800     Q_DISABLE_COPY( MarbleMap )
0801     MarbleMapPrivate * const d;
0802     friend class MarbleMapPrivate;
0803 
0804     class CustomPaintLayer;
0805     friend class CustomPaintLayer;
0806 };
0807 
0808 }
0809 
0810 #endif