[GRASS-dev] QGIS GRASS Plugin Upgrade Crowdfunding

Vaclav Petras wenzeslaus at gmail.com
Tue Mar 24 11:04:34 PDT 2015


On Tue, Mar 24, 2015 at 1:30 PM, Pietro <peter.zamb at gmail.com> wrote:

> Hi Vaclav,
>
> On Tue, Mar 24, 2015 at 3:54 PM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
> > On Tue, Mar 24, 2015 at 2:00 AM, Pietro <peter.zamb at gmail.com> wrote:
> >> together with Francesco Geri, last week we started to write a first
> >> draft that generate the GUI for the GRASS module dynamically (based on
> >> the xml generated with: --interface-description), so far it is based
> >> on grass7 but should work also on grass6 (not tested, should be enough
> >> to backport the pygrass.modules.Module class).
> >
> > Hi Pietro and Francesco,
> >
> > this sounds good. Are you speaking about QGIS GUI (in Python) generated
> from
> > --interface-description? Do you think it would be possible to write it
> in a
> > way which would be GUI framework independent so that it is usable in both
> > GRASS and QGIS? The GUIs for modules in GRASS are quite good now but the
> > code should be rewritten and this would be a great way how to get this
> new
> > implementation.
>
> yes, actually what I wrote it is completely independent from QGIS, it
> is compatible with pyqt/pyside and with python2/python3,
> It is just a proof of concept. Now Francesco it is working to better
> integrate this draft with QGIS stuff.
>
> That's good to hear.


> The idea was heavily based on formlayout code:
>
> https://code.google.com/p/formlayout/
>
> Basically each parameter is a GUI field that it is add to the main
> window, therefore based on the parameter type the field could be:
>
> if "raster"/"vector" => a combo box with the rasters/vectors available
> if "integer" => a spinbox
> if "string"/"double" => a text field
> if "file" => a file dialog
>
> based on the guisection parameter all the options are organized in tabs.
>
>
Both QGIS and GRASS are adding different extra features like setting region
according to a selected raster or dependent fields for vector GRASS layers
and attributes. That's why it gets complicated at the end. And of course
then there is the extra information which is not stored in XML such as
"GRASS standard options".

Anyway, skipping qgm is quite important feature for QGIS since it is
necessary for GRASS addons as you say.


> The code is under 500 lines of code.
>
> I guess should be possible to follow the same approach using the wxpython.
> I think that with a bit more effort should be possible to make it
> general enough to make it independent from the GUI framework (Qt/Wx)
> that we want to use.
>
> I have not link to share at this stage because we are still working on it.
> But I guess we can share the code as soon as we have something that it
> is able to cover the basic needs.
>
> I'm looking forward to that.

>
> Pietro
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20150324/eb679c22/attachment-0001.html>


More information about the grass-dev mailing list