[Qgis-developer] Changing the Renderer Type in PyQGis Application
justin at pyrotechsoftware.com
Thu Nov 1 04:24:25 PDT 2012
Can iface be called from a standalone PyQGis application?
On Thu, Nov 1, 2012 at 1:12 PM, Matthias Kuhn <matthias.kuhn at gmx.ch> wrote:
> On Thu, 2012-11-01 at 12:19 +0200, Justin Hubbard wrote:
> > In line with this, Is there any way to open a QGIS dialog (To edit
> > layer properties for example) from a PyQGis application?
> > Has anyone been able to do this?
> iface.showLayerProperties( mapLayer )
> > Thanks
> > Justin
> > On Thu, Nov 1, 2012 at 9:32 AM, Matthias Kuhn <matthias.kuhn at gmx.ch>
> > wrote:
> > Hi Justin,
> > What you want to do is probably create a new renderer of
> > different type
> > and replace the current renderer with the new one. You have to
> > create it
> > yourself.
> > In the API  click on "Inheritance diagram" (just on the top
> > of the
> > page) to see, what subclasses are available.
> > The you set the new renderer on the vector layer, I think that
> > should do
> > the trick.
> > Regards,
> > Matthias
> > : http://www.qgis.org/api/classQgsFeatureRendererV2.html
> > On Thu, 2012-11-01 at 08:58 +0200, Justin Hubbard wrote:
> > > Hi
> > >
> > >
> > > I would like to know how to change the renderer type in a
> > PyQGis
> > > application.
> > > The vector layer (Spatialite) is a singleSymbol type
> > currently. (Point
> > > geometries) and I need to change the symbols depending on
> > the value of
> > > an attribute in the layer.
> > > I am new to Python and QGis so have no idea how to do this.
> > (I notice
> > > that there is no setType method on the QgsFeatureRendererV2,
> > which i
> > > would have assumed would do the trick)
> > >
> > >
> > > Any help appreciated
> > > _______________________________________________
> > > Qgis-developer mailing list
> > > Qgis-developer at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
Software Engineer and Support
+27 (0)79 827 1657
+27 (0)86 540 6016
justin at pyrotechsoftware.com <robert at plannermunicipalsoftware.co.za>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Qgis-developer