[Qgis-developer] QGIS standalone app - layer tree, legend and co.

Germán Carrillo carrillo.german at gmail.com
Sat Jul 5 18:42:15 PDT 2014


Matthias,

have a look at the Layer list widget for PyQGIS applications [1], perhaps
it could fit your needs.

Not sure if it works on recent QGIS versions, though.

Regards,

Germán
-----
[1]
http://geotux.tuxfamily.org/index.php/en/component/k2/item/270-tabla-de-contenido-leyenda-para-aplicaciones-basadas-en-pyqgis/



2014-07-04 10:07 GMT-05:00 Martin Dobias <wonder.sk at gmail.com>:

> Hi Matthias
>
> On Wed, Jul 2, 2014 at 4:17 PM, Matthias Ludwig <kaotika at gmx.de> wrote:
> >
> > Hi,
> >
> > I'am writing a data viewer as python qgis standalone application. Is it
> possible to use the QgisInterface and other classes (like
> QgsLegendInterface) for layer handling (adding, removing, activation, etc.)?
> > Cause I didn't found a way I have written my own layer model based on
> qts QAbstractListModel. It's working more or less, but I would prever a
> nativ solution if available.
>
> QgisInterface and QgsLegendInterface will not work if you are
> developing a standalone application. As Andreas suggested, if you base
> your application on QGIS 2.4, you can use new layer tree classes:
> QgsLayerTreeView + QgsLayerTreeModel for Qt model/view and
> QgsLayerTreeGroup + QgsLayerTreeLayer classes for the actual hierarchy
> that will be used by the model and view classes. There is some doxygen
> documentation in the header files, but I am in the process of
> preparing some blog posts about the new classes... stay tuned!
>
> Regards
> Martin
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



-- 
-----------
   |\__
(:>__)(
   |/

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20140705/a5a4c8e0/attachment.html>


More information about the Qgis-developer mailing list