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 <[email protected]>:

> Hi Matthias
>
> On Wed, Jul 2, 2014 at 4:17 PM, Matthias Ludwig <[email protected]> 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
> [email protected]
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>



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

Soluciones Geoinformáticas Libres
http://geotux.tuxfamily.org/
http://twitter.com/GeoTux2
_______________________________________________
Qgis-developer mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/qgis-developer

Reply via email to