[GRASS-dev] Access to GRASS GIS addons

Ondřej Pešek pesej.ondrek at gmail.com
Thu Oct 11 11:20:40 PDT 2018


čt 11. 10. 2018 v 17:24 odesílatel Vaclav Petras <wenzeslaus at gmail.com>
napsal:

> A 2016 GSoC project took different approach which could be reused in QGIS
> independently from the current GRASS Plugin or Processing plugin
> approaches. This is a good base for future work, perhaps even for
> auto-generating the files needed for GRASS plugin or Processing plugin.
>
> https://trac.osgeo.org/grass/wiki/GSoC/2016/PyQtGUI
>


If you start QGIS from the GRASS GIS shell, then you can use a module
g.pyqt from the above-mentioned GSoC project and parse the name of the
AddOn as a parameter. It will generate the fully-working GUI for you.

So if you want to create a QGIS plugin and don't want to create the GUI
from scratch, then you can call something like `g.pyqt r.estimap` after
clicking on the icon of the plugin and it's done. However, it will still
work just with maps in GRASS, it will not import them into QGIS or
something, and there is also this strange thing about running QGIS from the
GRASS GIS shell.

And I didn't touch the code for some time, so there are still some places
which should be improved. But it should be working if you have your AddOn
installed in GRASS.

PS: I believe that the code can be also re-written to generate the QGIS
plugin GUI without all those strange necessities without so much work, but
unfortunately I don't have enough time to do it in the near future.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20181011/85eb547f/attachment.html>


More information about the grass-dev mailing list