[Qgis-developer] How to access the QgsVisibilityPresetCollection() in pyqgis

Alexandre Neto senhor.neto at gmail.com
Thu Oct 29 06:17:58 PDT 2015


Hi Nyall,

Thanks!

Nyall Dawson <nyall.dawson at gmail.com> escreveu no dia qui, 29/10/2015 às
12:55:

> On 29 October 2015 at 23:31, Alexandre Neto <senhor.neto at gmail.com> wrote:
> > Is it possible to access to presets in a project using PyQgis? I found
> > QgsVisibilityPresetCollection() in QGIS API, but I can't seem to find
> how to
> > access the current one used by the active project.
>
> You access it through the project instance (in 2.12 at least... it
> wasn't accessible to PyQGIS in previous versions). See
> http://qgis.org/api/classQgsProject.html#a33240f824d62c40d56ee569f6b0ac2a5
>
> Nyall
>
>
> >
> > My plans were to create a plugin that allows to manage all the projec
> > presets. Things like update or rename a preset (without the need to
> remove
> > the current ones), and also return a list of presets to be used in Map
> > Composition.
> >
> > Thanks
> > Alexandre Neto
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20151029/d90e6c08/attachment-0001.html>


More information about the Qgis-developer mailing list