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

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.

(attachments)

r.watershed_GUI.JPG
r.watershed_GUI_CHANGED.JPG

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 GRASS.

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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

Regards,

Rashad

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@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
GRASS.

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@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@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Regards,
Rashad

_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Thu, Dec 22, 2011 at 12:22 PM, Markus Metz
<markus.metz.giswork@googlemail.com> wrote:

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,

Yes, see for example

grass64/gui/scripts/v.type_wrapper.py
grass64/gui/scripts/v.type_wrapper.sh

or
gui/wxpython/scripts/r.li.setup.py
gui/wxpython/scripts/vkrige.py

Markus