Creating a GUI
02 Aug 2012 12:48 #22676
by BigJohnT
Creating a GUI was created by BigJohnT
I was kinda wandering off track on the Gscreen topic so I thought I'd start a new topic on this. I see Chris used Touchy as a template for Gscreen so that got me to looking at what the other Chris had done to create Touchy.
If you download the source from the git repo go to src/emc/usr_interface/touchy and you can see the files that Chris used to create touchy. There is a glade file and some python files and a submake file. I assume if you copied the modules emc_interface.py, filechooser.py, hal_interface.py, listing.py, mdi.py, preferences.py to a new directory and used touchy.glade and touchy.py and submakefile as templates you could create a new gui.
We will see how far I can get with that... I have some basic Gtk Glade Python tutorials on my web site that have helped me to get the basics of that combo understood.
I'd like to see what the bare minimum of code was needed to just run the gui with linuxcnc and not even do much...
John
If you download the source from the git repo go to src/emc/usr_interface/touchy and you can see the files that Chris used to create touchy. There is a glade file and some python files and a submake file. I assume if you copied the modules emc_interface.py, filechooser.py, hal_interface.py, listing.py, mdi.py, preferences.py to a new directory and used touchy.glade and touchy.py and submakefile as templates you could create a new gui.
We will see how far I can get with that... I have some basic Gtk Glade Python tutorials on my web site that have helped me to get the basics of that combo understood.
I'd like to see what the bare minimum of code was needed to just run the gui with linuxcnc and not even do much...
John
Please Log in or Create an account to join the conversation.
03 Aug 2012 11:45 - 04 Aug 2012 11:51 #22715
by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Last edit: 04 Aug 2012 11:51 by BigJohnT.
Please Log in or Create an account to join the conversation.
04 Aug 2012 00:02 #22751
by cmorley
Replied by cmorley on topic Re:Creating a GUI
I can't download your program. - internal server error
If you use gladevcp objects then most of what I can see in the pic would already work.
there are Glade actions for power and estop, widgets for MDI, gcode and backplot.
There is no widget for DRO so that one you would need to program (though gremlin has a small DRO)
If you use gladevcp objects then most of what I can see in the pic would already work.
there are Glade actions for power and estop, widgets for MDI, gcode and backplot.
There is no widget for DRO so that one you would need to program (though gremlin has a small DRO)
Please Log in or Create an account to join the conversation.
04 Aug 2012 00:27 #22753
by cmorley
Replied by cmorley on topic Re:Creating a GUI
here is a gladefile that Pavel was working on he called it gaxis:
Please Log in or Create an account to join the conversation.
04 Aug 2012 00:38 #22754
by cmorley
Replied by cmorley on topic Re:Creating a GUI
here is a hacked program to run it.
to try it out in one terminal run a linuxcnc config and in another run this program using python.
then you can control linuxcnc from the Gaxis screen.
to try it out in one terminal run a linuxcnc config and in another run this program using python.
then you can control linuxcnc from the Gaxis screen.
Please Log in or Create an account to join the conversation.
04 Aug 2012 11:49 #22759
by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
I get an internal server error on the py file...
John
John
Please Log in or Create an account to join the conversation.
04 Aug 2012 11:54 - 04 Aug 2012 11:55 #22761
by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Ok zipping the file seems to work...
John
John
Last edit: 04 Aug 2012 11:55 by BigJohnT.
Please Log in or Create an account to join the conversation.
04 Aug 2012 16:10 #22778
by cmorley
Replied by cmorley on topic Re:Creating a GUI
lets try it as a compressed file...
Please Log in or Create an account to join the conversation.
04 Aug 2012 16:33 #22779
by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
That works for me...
John
John
Please Log in or Create an account to join the conversation.
04 Aug 2012 18:07 - 04 Aug 2012 18:12 #22785
by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Ok, I have a gui piggy backed onto Axis... what is the minimum needed to run it stand alone?
The tool bar was a bugger to figure out... add a tool bar, add some hal actions, click on the button bar int the tree cause it disappears from the screen... then click on the edit button on the button bar then add your toggle buttons. Add a stock icon to each action and add the related action to the toggle button and select use action appearance... whew tough to sort out the first time.
The back plot will display a file that is opened and show tool movement but the dro seems too big I might move it somewhere else later. Also the screen doesn't pan like Axis does but rotates about the center... yuck.
John
The tool bar was a bugger to figure out... add a tool bar, add some hal actions, click on the button bar int the tree cause it disappears from the screen... then click on the edit button on the button bar then add your toggle buttons. Add a stock icon to each action and add the related action to the toggle button and select use action appearance... whew tough to sort out the first time.
The back plot will display a file that is opened and show tool movement but the dro seems too big I might move it somewhere else later. Also the screen doesn't pan like Axis does but rotates about the center... yuck.
John
Last edit: 04 Aug 2012 18:12 by BigJohnT.
Please Log in or Create an account to join the conversation.
Time to create page: 0.089 seconds