Gscreen - a GTK / Glade / Python based screen

More
27 Nov 2012 04:56 - 27 Nov 2012 04:57 #26965 by cmorley
So if there is any GLADE tinkers out there..

Gscreen can support loading custom screens, in fact there are two samples in master.
One is just a few changes to Gscreen (eg 9 axis buttons) the other is AXIS-like called Gaxis.

Gaxis uses a lot of hal_actions to interact with linuxcnc so doesn't need much python code beyond what Gscreen sets up to display it.

Anyways I am not very artistic so if anyone comes up with a good screen design I would love to get a hold of it and make sure Gscreen is flexible enough to handle it. Even screens designed for a specific purpose / machine would be interesting.

There are a few tricks yet I need to work on like DRO readout widgets with clear backgrounds so they can be placed over image files...
I'm quite excited about the custom screen aspect of Gscreen - the full power of gladeVCP was not apparent to me until recently.

Chris M
Last edit: 27 Nov 2012 04:57 by cmorley.

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

More
27 Nov 2012 14:27 #26976 by awallin
I noticed GTK does not have a native chart-widget.
Has anyone played with any of the GTK chart-widgets available out there?
I was thinking of plotting following-error, spindle/axis-load, etc. over time in one tab.

I am guessing userspace (i.e. non-realtime) sampling and plotting of a HAL-signal value will be straightforward to do.
Can someone comment on real-time sampling? i.e. we would get a chart plot where we know we have the actual real-time data without hidden glitches or similar.
This would essentially allow embedding halscope like functionality into gscreen.

On mobile phones and tablets with touchscreens there is a lot of UI functionality based on swipe-gestures etc. Does GTK have support for these?
(Nokia based their MeeGo UI on Qt, and now later Jolla seems to continue that work, so at least Qt has good touchscreen support).

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

More
27 Nov 2012 15:29 #26977 by cmorley
gladeVCP has a graph widget.

Actually with some small code changes halscope should be able to be embedded in GTK projects, using the protocol that gladeVCP uses.
but that seems pretty specialized for a machine controller aside from tuning. I would think that loading it stand alone would suffice. Ddid you have a particular idea for it?

GTK does not have gesture support and will only have it in GTK3 when it does, which we currently do not support.

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

More
27 Nov 2012 17:46 #26981 by mhaberler
I played with that a while ago

I'd recommend looking into matplotlib, which even integrates with glade
example: matplotlib.org/1.2.0/examples/old_animat...trip_chart_demo.html
this might help too: www.scipy.org/Cookbook/Matplotlib/Animations
realtime updates: this is wx, but you get the idea: eli.thegreenplace.net/2008/08/01/matplotlib-with-wxpython-guis/

a narrow-focused option would be pystripchart, which I didnt like so much

- Michael

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

More
02 Dec 2012 17:53 - 02 Dec 2012 17:56 #27122 by cmorley

For those who really liked MACH screens ....

I borrowed a screen JPG converted it to a PNG and built a config to show it.
Then placed a graphics plot in the center and a Gcode view in the upper right.
I placed these in the respective places they belonged to in the original screen.

It's a real pain to set up and you can't resize the screen or everything is out of place.
But it shows the power of Gscreen and gladeVCP ...... and Linuxcnc
If anyone happens to build a nice background pic I would consider actually finishing it as a sample.
Attachments:
Last edit: 02 Dec 2012 17:56 by cmorley.

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

More
02 Dec 2012 19:20 #27123 by awallin
why would anyone want a panel that looks like that ? :)

Two questions:
- can you get a pop-up on-screen keyboard if on a touch-screen the user clicks a text-entry field?
- similarly, can you get a pop-up number-keypad when the user switches focus to a number entry field?

These are ofcourse trivial if you have a keyboard attached, but how does one enter (small amounts of) text and numbers through touchscreen?

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

More
02 Dec 2012 19:55 #27125 by BigJohnT
I have a working example for the number keypad finally. You touch a number field it pops up and shows the number as you type and when you press the save button it puts that number into the field and goes away.

linuxcnc.org/index.php/english/forum/41-...-gtk-ngcgui?start=12

John

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

More
03 Dec 2012 00:34 #27127 by cmorley
awallin

Gscreen (actually gladVCP) has a pop up calculator that doubles as a entry widget.
If using a mouse you double click the entry widget if using a touch screen (with the cusor hidden) touch it once.

I didn't build a keyboard widget but I beleive Ubuntu 12.04 has a 'ghosted' keyboard for touch screens built in.
I remember seeing this but have never inverstigated it.

Yes that MACH screen is not for me either, It's the reason I won't bother making it fully functional.
It was the concept of widgets over image that I was interested in. I'm not an artists but if someone comes up with a nice design I will atempt to make it fully functional.

Chris M

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

More
03 Dec 2012 00:42 #27128 by BigJohnT
How did you position the widgets?

John

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

More
03 Dec 2012 02:30 #27129 by cmorley
I use 'fixed window' on top of the toplevel window.

This is why you can't resize the screen without the widgets being in the wrong place.

To make this easier I might try building a custom wodget that allows one to load an image on it.
Then I,d have to play with the fixed window widget so the image showed thru....

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

Time to create page: 0.155 seconds
Powered by Kunena Forum