[QGIS Commit] r9446 - in trunk/qgis: python/core src/app tools/mapserver_export

svn_qgis at osgeo.org svn_qgis at osgeo.org
Mon Oct 6 14:50:42 EDT 2008


Author: timlinux
Date: 2008-10-06 14:50:42 -0400 (Mon, 06 Oct 2008)
New Revision: 9446

Modified:
   trunk/qgis/python/core/qgsrasterlayer.sip
   trunk/qgis/python/core/qgsvectorlayer.sip
   trunk/qgis/src/app/qgsmapserverexport.cpp
   trunk/qgis/tools/mapserver_export/qgsmapserverexport.cpp
Log:
API Cleanups

Modified: trunk/qgis/python/core/qgsrasterlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsrasterlayer.sip	2008-10-06 18:42:53 UTC (rev 9445)
+++ trunk/qgis/python/core/qgsrasterlayer.sip	2008-10-06 18:50:42 UTC (rev 9446)
@@ -502,7 +502,21 @@
     */
     /* virtual */ bool readXml( QDomNode & layer_node );
 
+  /** Read the symbology for the current layer from the Dom node supplied. 
+   * @param QDomNode node that will contain the symbology definition for this layer.
+   * @param errorMessage reference to string that will be updated with any error messages
+   * @return true in case of success.
+   */
+  bool readSymbology(const QDomNode& node, QString& errorMessage);
 
+  /** Write the symbology for the layer into the docment provided.
+   *  @param QDomNode the node that will have the style element added to it.
+   *  @param QDomDocument the document that will have the QDomNode added.
+   * @param errorMessage reference to string that will be updated with any error messages
+   *  @return true in case of success.
+   */
+  bool writeSymbology(QDomNode&, QDomDocument& doc, QString& errorMessage) const;
+      
 
   /** write vector layer specific state to project file Dom node.
 

Modified: trunk/qgis/python/core/qgsvectorlayer.sip
===================================================================
--- trunk/qgis/python/core/qgsvectorlayer.sip	2008-10-06 18:42:53 UTC (rev 9445)
+++ trunk/qgis/python/core/qgsvectorlayer.sip	2008-10-06 18:50:42 UTC (rev 9446)
@@ -114,6 +114,21 @@
   virtual bool writeXml( QDomNode & layer_node, QDomDocument & doc );
 
 
+  /** Read the symbology for the current layer from the Dom node supplied. 
+   * @param QDomNode node that will contain the symbology definition for this layer.
+   * @param errorMessage reference to string that will be updated with any error messages
+   * @return true in case of success.
+   */
+  bool readSymbology(const QDomNode& node, QString& errorMessage);
+
+  /** Write the symbology for the layer into the docment provided.
+   *  @param QDomNode the node that will have the style element added to it.
+   *  @param QDomDocument the document that will have the QDomNode added.
+   * @param errorMessage reference to string that will be updated with any error messages
+   *  @return true in case of success.
+   */
+  bool writeSymbology(QDomNode&, QDomDocument& doc, QString& errorMessage) const;
+
   /**
    * Number of features in the layer. This is necessary if features are
    * added/deleted or the layer has been subsetted. If the data provider

Modified: trunk/qgis/src/app/qgsmapserverexport.cpp
===================================================================
--- trunk/qgis/src/app/qgsmapserverexport.cpp	2008-10-06 18:42:53 UTC (rev 9445)
+++ trunk/qgis/src/app/qgsmapserverexport.cpp	2008-10-06 18:50:42 UTC (rev 9446)
@@ -192,7 +192,7 @@
     {
       bool isPolygon = false;
       bool isLine = false;
-      QgsMapLayer *lyr = map->getZpos( i );
+      QgsMapLayer *lyr = map->layer( i );
       QgsDebugMsg( "Mapsrver Export Processing Layer" );
       mapFile << "LAYER" << std::endl;
       QString name = lyr->name().lower();

Modified: trunk/qgis/tools/mapserver_export/qgsmapserverexport.cpp
===================================================================
--- trunk/qgis/tools/mapserver_export/qgsmapserverexport.cpp	2008-10-06 18:42:53 UTC (rev 9445)
+++ trunk/qgis/tools/mapserver_export/qgsmapserverexport.cpp	2008-10-06 18:50:42 UTC (rev 9446)
@@ -322,7 +322,7 @@
     {
       bool isPolygon = false;
       bool isLine = false;
-      QgsMapLayer *lyr = map->getZpos(i);
+      QgsMapLayer *lyr = map->layer(i);
   #ifdef QGISDEBUG
       std::cout << "Mapsrver Export Processing Layer" << std::endl;
   #endif



More information about the QGIS-commit mailing list