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

Andrew Manson g.real.ate at gmail.com
Mon Aug 3 19:07:09 CEST 2009


SVN commit 1006391 by mansona:

Add more of the XML writing architecture. 
Fix loads of compiler warnings. 


 M  +1 -0      CMakeLists.txt  
 M  +7 -9      lib/geodata/CMakeLists.txt  
 M  +3 -0      lib/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp  
 M  +8 -0      lib/geodata/parser/GeoTagHandler.h  
 A             lib/geodata/writer/GeoTagWriter.cpp   [License: LGPL]
 A             lib/geodata/writer/GeoTagWriter.h   [License: LGPL]
 A             lib/geodata/writers (directory)  
 A             lib/geodata/writers/kml (directory)  
 A             lib/geodata/writers/kml/KmlPlacemarkTagWriter.cpp   [License: LGPL]
 A             lib/geodata/writers/kml/KmlPlacemarkTagWriter.h   [License: LGPL]
 M  +4 -0      plugins/render/osmannotate/AreaAnnotation.cpp  
 M  +0 -1      plugins/render/osmannotate/AreaAnnotation.h  
 M  +2 -1      plugins/render/osmannotate/GeoWidgetBubble.cpp  
 M  +1 -0      plugins/render/osmannotate/PlacemarkTextAnnotation.cpp  
 M  +3 -0      plugins/render/osmannotate/TmpGraphicsItem.cpp  
 M  +1 -0      plugins/render/osmannotate/osm/OsmBoundsGraphicsItem.cpp  
 M  +1 -0      plugins/render/osmannotate/osm/OsmNodeGraphicsItem.cpp  
 M  +3 -0      plugins/render/osmannotate/osm/OsmWayGraphicsItem.cpp  


--- trunk/KDE/kdeedu/marble/src/CMakeLists.txt #1006390:1006391
@@ -18,6 +18,7 @@
   ${CMAKE_CURRENT_SOURCE_DIR}/lib/geodata/graphicsitem
   ${CMAKE_CURRENT_SOURCE_DIR}/lib/geodata/handlers/dgml
   ${CMAKE_CURRENT_SOURCE_DIR}/lib/geodata/parser
+  ${CMAKE_CURRENT_SOURCE_DIR}/lib/geodata/writer
   ${CMAKE_CURRENT_SOURCE_DIR}/lib/geodata/scene
   ${CMAKE_CURRENT_SOURCE_DIR}/lib/graphicsview
   ${CMAKE_CURRENT_BINARY_DIR}
--- trunk/KDE/kdeedu/marble/src/lib/geodata/CMakeLists.txt #1006390:1006391
@@ -7,21 +7,18 @@
 FILE( GLOB geodata_data_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/data/*.cpp )
 FILE( GLOB geodata_graphicsitem_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/graphicsitem/*.cpp )
 FILE( GLOB geodata_scene_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/scene/*.cpp )
+
+# handlers and writers sources 
 FILE( GLOB geodata_handlers_dgml_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/handlers/dgml/*.cpp )
 FILE( GLOB geodata_handlers_kml_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/handlers/kml/*.cpp )
+FILE( GLOB geodata_writers_kml_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/writers/kml/*.cpp )
+
+# writer and the parser sources 
+FILE( GLOB geodata_parser_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/parser/*.cpp )
 FILE( GLOB geodata_writer_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/writer/*.cpp )
 
 FILE( GLOB geodata_data_HDRS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} geodata/data/*.h )
 
-SET( geodata_parser_SRCS
-        geodata/parser/GeoDataParser.cpp
-        geodata/parser/GeoDocument.cpp
-        geodata/parser/GeoOnfParser.cpp
-        geodata/parser/GeoParser.cpp
-        geodata/parser/GeoSceneParser.cpp
-        geodata/parser/GeoTagHandler.cpp
-   )
-
 SET( geodata_handlers_gpx_SRCS
         geodata/handlers/gpx/GPXElementDictionary.cpp
         geodata/handlers/gpx/GPXgpxTagHandler.cpp
@@ -47,6 +44,7 @@
         ${geodata_handlers_kml_SRCS}
         ${geodata_handlers_dgml_SRCS}
         ${geodata_handlers_osmnamefinder_SRCS}
+        ${geodata_writers_kml_SRCS}
    )
 
 #add_subdirectory(geodata/data/tests)
--- trunk/KDE/kdeedu/marble/src/lib/geodata/graphicsitem/GeoLineStringGraphicsItem.cpp #1006390:1006391
@@ -33,6 +33,9 @@
 void GeoLineStringGraphicsItem::paint( GeoPainter* painter, ViewportParams* viewport,
                                        const QString& renderPos, GeoSceneLayer* layer )
 {
+    Q_UNUSED(viewport);
+    Q_UNUSED(renderPos);
+    Q_UNUSED(layer);
     painter->drawPolyline( m_lineString );
 }
 
--- trunk/KDE/kdeedu/marble/src/lib/geodata/parser/GeoTagHandler.h #1006390:1006391
@@ -31,6 +31,14 @@
 class GeoNode;
 class GeoParser;
 
+/**
+ * @brief A base class for XML tag handlers
+ * This is a base class that is used in the GeoParser architecture. To implement
+ * a new GeoData format you will need to subclass GeoTagHandler and reimplement
+ * the @see parse(GeoParser&) method. You also need to register the newly
+ * implemented GeoTagHandler by declaring an instance of the helper structure
+ * @see GeoTagHandlerRegistrar with a corrisponding @see QualifiedName.
+ */
 class MARBLE_EXPORT GeoTagHandler {
 public:
     // API to be implemented by child handlers.
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/AreaAnnotation.cpp #1006390:1006391
@@ -27,6 +27,10 @@
 void AreaAnnotation::paint(GeoPainter *painter, ViewportParams *viewport,
                            const QString &renderPos, GeoSceneLayer *layer )
 {
+    Q_UNUSED(viewport);
+    Q_UNUSED(renderPos);
+    Q_UNUSED(layer);
+
     painter->save();
 
     painter->setBrush( QBrush( QColor( 0, 255, 255, 80 )  ) );
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/AreaAnnotation.h #1006390:1006391
@@ -27,7 +27,6 @@
                         const QString& renderPos, GeoSceneLayer * layer = 0 );
     //FIXME Waiting to be removed
     virtual QRect screenBounding(){return QRect();}
-    virtual void geoBounding(qreal angularResolution){}
 private:
     GeoDataPolygon m_geo;
 };
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/GeoWidgetBubble.cpp #1006390:1006391
@@ -24,11 +24,12 @@
     m_hidden = true;
 }
 
-void GeoWidgetBubble::paint( GeoPainter* painter, ViewportParams* view,
+void GeoWidgetBubble::paint( GeoPainter* painter, ViewportParams* viewport,
                              const QString &renderPos, GeoSceneLayer *layer )
 {
     Q_UNUSED( renderPos );
     Q_UNUSED( layer );
+    Q_UNUSED( viewport );
 
     if( !marbleWidgetInitalised && ( m_widget!=0)  ) {
         initaliseMarbleWidget( (QWidget* ) painter->device() );
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/PlacemarkTextAnnotation.cpp #1006390:1006391
@@ -149,6 +149,7 @@
 
 bool PlacemarkTextAnnotation::mousePressEvent( QMouseEvent* event )
 {
+    Q_UNUSED(event);
     bubble->setHidden( !bubble->isHidden() );
     return true;
 }
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/TmpGraphicsItem.cpp #1006390:1006391
@@ -29,6 +29,8 @@
 
 QVariant TmpGraphicsItem::itemChange(GeoGraphicsItemChange change, QVariant v )
 {
+    Q_UNUSED(change);
+    Q_UNUSED(v);
     return QVariant();
 }
 
@@ -68,6 +70,7 @@
 
 bool TmpGraphicsItem::mousePressEvent( QMouseEvent* event )
 {
+    Q_UNUSED( event )
     //FIXME re-implement the whole ItemIsSelectable and call an
     //Item Change
     return false;
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/osm/OsmBoundsGraphicsItem.cpp #1006390:1006391
@@ -36,6 +36,7 @@
 {
     Q_UNUSED( renderPos )
     Q_UNUSED( layer )
+    Q_UNUSED( viewport )
 
     painter->save();
     painter->setPen( m_pen );
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/osm/OsmNodeGraphicsItem.cpp #1006390:1006391
@@ -26,6 +26,7 @@
 {
     Q_UNUSED( renderPos )
     Q_UNUSED( layer )
+    Q_UNUSED( viewport )
 
     painter->save();
     //stop points from blurring
--- trunk/KDE/kdeedu/marble/src/plugins/render/osmannotate/osm/OsmWayGraphicsItem.cpp #1006390:1006391
@@ -55,6 +55,9 @@
 void OsmWayGraphicsItem::paint( GeoPainter* painter, ViewportParams* viewport,
                                 const QString& renderPos, GeoSceneLayer* layer )
 {
+    Q_UNUSED(viewport);
+    Q_UNUSED(renderPos);
+    Q_UNUSED(layer);
     painter->save();
 
     painter->setPen( Qt::black );


More information about the Marble-commits mailing list