[Qgis-developer] G_OPT_V_TYPE cannot be recognized in --interface-description in GRASS GIS

Vaclav Petras wenzeslaus at gmail.com
Mon Aug 24 18:31:29 PDT 2015


Was: [Qgis-developer] QGIS GRASS plugin - modules upgrade


On Mon, Aug 24, 2015 at 2:42 PM, Radim Blazek <radim.blazek at gmail.com>
wrote:

> On Tue, Aug 18, 2015 at 9:39 PM, Vaclav Petras <wenzeslaus at gmail.com>
> wrote:
> >> > I wonder why UI is not generated on the fly or during compilation? To
> >> > maintain manually UI in QGIS is complicated and the result will be
> >> > always out-of-date. Just 2 my cents, Martin
> >>
> >> UI is generated on the fly when a module UI is opened. It is using
> >> options description printed by GRASS module (--interface-description)
> >> combined with options definition for the module in QGIS (.qgm file).
> >> The additional options definition in QGIS is mainly for two purposes:
> >>
> >> 1) limit number of options not to frighten users, some GRASS modules
> >> are also represented as multiple items with predefined options
> >
> > Hi Radim and Martin,
> >
> > I guess that one of the reasons for QGIS interface for GRASS. Anyway, is
> > there a option of not using .qgm file and using --interface-description
> > only? This would not only enable some of the hidden features but more
> > importantly, it would enable to use of modules from GRASS GIS Addons
> > repository.
> >
> >> 2) define relations between options (e.g. type or column option
> >> relation with input vector) or special options which has dedicated
> >> widget in UI (e.g. GDAL/OGR input).
> >
> > This should be defined in GRASS GIS. If it is missing in GRASS or in the
> > --interface-description then it is a bug which should be solved.
>
> How can I recognize G_OPT_V_TYPE in  --interface-description? It does
> not have gisprompt.


Right [1]. I think this is a bug. No gisprompt is there. I think wxGUI
doesn't need it because the values for the combo box are defined there
already.

I suppose we can add something like 'type' or 'vtype' as one of the values
for gisprompt. No 'type' is currently used in the gisprompt, although it
might have been used in the past [2]. Probably the following could be the
gisprompt:

'old,vtype,vtype'
'old,v3type,v3type'

Unfortunately, I'm not sure about 'old' versus 'new' in this context (for
other things then maps) but hopefully somebody knows. I'm also not sure
about handing of unknown gisprompts in wxGUI but this can be easily tested.

Vaclav

[1]
https://trac.osgeo.org/grass/browser/grass/trunk/lib/gis/parser_standard_options.c#L487
[2]
https://trac.osgeo.org/grass/browser/grass/trunk/display/d.rast.arrow/main.c#L173
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150824/e389f3dc/attachment.html>


More information about the Qgis-developer mailing list