[QGIS Commit] r15058 - docs/trunk/english_us/developer_cookbook/source

svn_qgis at osgeo.org svn_qgis at osgeo.org
Wed Jan 19 17:47:23 EST 2011


Author: wonder
Date: 2011-01-19 14:47:23 -0800 (Wed, 19 Jan 2011)
New Revision: 15058

Modified:
   docs/trunk/english_us/developer_cookbook/source/composer.rst
Log:
Small additions to composer section


Modified: docs/trunk/english_us/developer_cookbook/source/composer.rst
===================================================================
--- docs/trunk/english_us/developer_cookbook/source/composer.rst	2011-01-19 14:25:52 UTC (rev 15057)
+++ docs/trunk/english_us/developer_cookbook/source/composer.rst	2011-01-19 22:47:23 UTC (rev 15058)
@@ -92,7 +92,21 @@
     c.addItem(composerLabel)
 
 * legend
+  ::
+
+    legend = QgsComposerLegend(c)
+    legend.model().setLayerSet(mapRenderer.layerSet())
+    c.addItem(legend)
+
 * scale bar
+  ::
+
+    item = QgsComposerScaleBar(c)
+    item.setStyle('Numeric') # optionally modify the style
+    item.setComposerMap(composerMap)
+    item.applyDefaultSize()
+    c.addItem(item)
+
 * arrow
 * picture
 * shape



More information about the QGIS-commit mailing list