[Marble-commits] KDE/kdeedu/marble/src/lib

Jens-Michael Hoffmann jensmh at gmx.de
Tue May 18 00:03:30 CEST 2010


SVN commit 1127886 by jmhoffmann:

Move ServerLayout classes into Marble namespace.

 M  +9 -5      ServerLayout.cpp  
 M  +10 -9     ServerLayout.h  
 M  +1 -1      geodata/scene/GeoSceneTexture.h  


--- trunk/KDE/kdeedu/marble/src/lib/ServerLayout.cpp #1127885:1127886
@@ -15,18 +15,20 @@
 #include "global.h"
 #include "TileId.h"
 
+namespace Marble
+{
 
 ServerLayout::~ServerLayout()
 {
 }
 
 
-MarbleServerLayout::MarbleServerLayout( Marble::GeoSceneTexture *textureLayer )
+MarbleServerLayout::MarbleServerLayout( GeoSceneTexture *textureLayer )
     : m_textureLayer( textureLayer )
 {
 }
 
-QUrl MarbleServerLayout::downloadUrl( const QUrl &prototypeUrl, const Marble::TileId &id ) const
+QUrl MarbleServerLayout::downloadUrl( const QUrl &prototypeUrl, const TileId &id ) const
 {
     QUrl url = prototypeUrl;
     url.setPath( url.path() + m_textureLayer->relativeTileFileName( id ) );
@@ -35,12 +37,12 @@
 }
 
 
-OsmServerLayout::OsmServerLayout( Marble::GeoSceneTexture *textureLayer )
+OsmServerLayout::OsmServerLayout( GeoSceneTexture *textureLayer )
     : m_textureLayer( textureLayer )
 {
 }
 
-QUrl OsmServerLayout::downloadUrl( const QUrl &prototypeUrl, const Marble::TileId &id ) const
+QUrl OsmServerLayout::downloadUrl( const QUrl &prototypeUrl, const TileId &id ) const
 {
     const QString suffix = m_textureLayer->fileFormat().toLower();
     const QString path = QString( "%1/%2/%3.%4" ).arg( id.zoomLevel() )
@@ -55,7 +57,7 @@
 }
 
 
-QUrl CustomServerLayout::downloadUrl( const QUrl &prototypeUrl, const Marble::TileId &id ) const
+QUrl CustomServerLayout::downloadUrl( const QUrl &prototypeUrl, const TileId &id ) const
 {
     QString urlStr = prototypeUrl.toString();
 
@@ -65,3 +67,5 @@
 
     return QUrl( urlStr );
 }
+
+}
--- trunk/KDE/kdeedu/marble/src/lib/ServerLayout.h #1127885:1127886
@@ -17,7 +17,6 @@
 {
     class GeoSceneTexture;
     class TileId;
-}
 
 class ServerLayout
 {
@@ -32,36 +31,36 @@
      * @param id Marble-specific ID of requested tile
      * @return completed URL for requested tile id
      */
-    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const Marble::TileId &id ) const = 0;
+    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const TileId &id ) const = 0;
 };
 
 class MarbleServerLayout : public ServerLayout
 {
 public:
-    explicit MarbleServerLayout( Marble::GeoSceneTexture *textureLayer );
+    explicit MarbleServerLayout( GeoSceneTexture *textureLayer );
 
     /**
      * Completes the path of the @p prototypeUrl and returns it.
      */
-    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const Marble::TileId & ) const;
+    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const TileId & ) const;
 
 private:
-    Marble::GeoSceneTexture *const m_textureLayer;
+    GeoSceneTexture *const m_textureLayer;
 };
 
 class OsmServerLayout : public ServerLayout
 {
 public:
-    explicit OsmServerLayout( Marble::GeoSceneTexture *textureLayer );
+    explicit OsmServerLayout( GeoSceneTexture *textureLayer );
 
     /**
      * Appends %zoomLevel/%x/%y.%suffix to the path of the @p prototypeUrl and returns
      * the result.
      */
-    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const Marble::TileId & ) const;
+    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const TileId & ) const;
 
 private:
-    Marble::GeoSceneTexture *const m_textureLayer;
+    GeoSceneTexture *const m_textureLayer;
 };
 
 class CustomServerLayout : public ServerLayout
@@ -73,7 +72,9 @@
      *
      * Escape sequences are: {zoomLevel}, {x}, and {y}.
      */
-    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const Marble::TileId &id ) const;
+    virtual QUrl downloadUrl( const QUrl &prototypeUrl, const TileId &id ) const;
 };
 
+}
+
 #endif
--- trunk/KDE/kdeedu/marble/src/lib/geodata/scene/GeoSceneTexture.h #1127885:1127886
@@ -35,12 +35,12 @@
  * @short Texture dataset stored in a layer.
  */
 
-class ServerLayout;
 
 namespace Marble
 {
 class Blending;
 class DownloadPolicy;
+class ServerLayout;
 class TileId;
 
 class GeoSceneTexture : public GeoSceneAbstractDataset


More information about the Marble-commits mailing list