Creating a GUI

More
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

Please Log in or Create an account to join the conversation.

More
03 Aug 2012 11:45 - 04 Aug 2012 11:51 #22715 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
Chris,

If you want to move the plasma discussion over here it is fine with me.

Here is a screen shot of what I was generally thinking of.



The file I used to run the glade which does nothing but exit nicely.



John
Attachments:
Last edit: 04 Aug 2012 11:51 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
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)

Please Log in or Create an account to join the conversation.

More
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:

File Attachment:

File Name: gaxis.glade
File Size:38 KB
Attachments:

Please Log in or Create an account to join the conversation.

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

File Attachment:

File Name: gaxis.py
File Size:1 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
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

Please Log in or Create an account to join the conversation.

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

File Attachment:

File Name: test-47613...c572.zip
File Size:1 KB


John
Attachments:
Last edit: 04 Aug 2012 11:55 by BigJohnT.

Please Log in or Create an account to join the conversation.

More
04 Aug 2012 16:10 #22778 by cmorley
Replied by cmorley on topic Re:Creating a GUI
lets try it as a compressed file...

File Attachment:

File Name: gaxis.zip
File Size:4 KB
Attachments:

Please Log in or Create an account to join the conversation.

More
04 Aug 2012 16:33 #22779 by BigJohnT
Replied by BigJohnT on topic Re:Creating a GUI
That works for me...

John

Please Log in or Create an account to join the conversation.

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



File Attachment:

File Name: jtgui01.zip
File Size:2 KB


John
Attachments:
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.284 seconds
Powered by Kunena Forum