[GRASS-dev] how can I change r.watershed GUI ?

Markus Metz markus.metz.giswork at googlemail.com
Thu Dec 22 06:22:23 EST 2011

The easiest way to create a different GUI is probably to write a
simple script (bash for GRASS 6, Python for GRASS 7) where you can
change the name of options and in what GUI section they are to appear,
and then within the script create the command line for the regular
r.watershed and execute that command. If you then type the name of the
GRASS script on the command line, a GUI is automatically created using
the information in the header of the script. Have a look at existing
scripts in the scripts directory for inspiration. No need to write or
change C code.

Markus M

On Thu, Dec 22, 2011 at 11:37 AM, Mohammed Rashad
<mohammedrashadkm at gmail.com> wrote:
> Hey Sandip,
> As I said earlier in GRASS there is no indivual code for each gui. each
> module has a predefined interface description
> Grass gui parses this and create a gui when you execute r.wastershed from
> if you need to change gui you can do it but you are on your own. no one will
> do the job for you. if you have grass gis question ask
> we will defenitely answer if we know.
> For your question
> you need to create a python code for it (ofcourse you can choose C if you
> like) procedure is same
> you need build
> 1. form/wxWindow like you want(first screenshot)
> 2. allow user to fill the parameters
> 3. pass the parameters to r.wastershed module using gcmd
> gcmd.RunCommand(r.watershed --input=.....)
> if you want r.wastershed as a standalone module then you need to inherit
> classes from from mapwindow,mapdisp etc....
> i need to type more but need to go..  By the time you think about what I
> said
> Also let other developers also reply
> Hope this help
> On Thu, Dec 22, 2011 at 1:20 PM, Sandip Maity <sandip.stesalit at gmail.com>
> wrote:
>> Dear Friends,
>> I want to change r.watershed GUI.
>> I had change the GUI by changing menu.c in r.watershed->front folder and
>> then make command. After that i replaced the new r.watershed.exe to the bin.
>> The GUI is coming like 2nd attachment.
>> but, i want to change like 1st attachment file.
>> Please see the attachment and suggest the way.
>> Regards.
>> Sandip.
>> _______________________________________________
>> grass-dev mailing list
>> grass-dev at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/grass-dev
> --
> Regards,
>     Rashad
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

More information about the grass-dev mailing list