Adding simple graphics objects to GladeVCP?

More
7 years 5 months ago #134996 by RetrofitTools
Looking for comments on difficulty of adding simple graphic elements in GladeVCP...

Have custom machines, just two axes (one rotary, one linear), currently controlled by ancient DOS PCs with motion control boards. The UI is simple, but does include a machine work envelope (basically some lines/bars/rectangles) and filled and unfilled circles.

Thought LinuxCNC would be an elegant upgrade for control, but haven't done any GUIs from scratch yet. A quick look at tutorials and GladeVCP didn't give any example of adding custom elements like this, so curious for any feedback on this approach. Idea is to give a solution which can be supported a long time... the existing PC program dates from the mid 90s!

Thanks!

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

More
7 years 5 months ago #135001 by newbynobi
You can use the Drawimg area to make what you want.

I used that to create a custom widget called speedcontrol.

self.draw = gtk.DrawingArea()
self.draw.connect("expose-event", self.expose)

and in the def expose you can draw the circles etc.

Norbert
The following user(s) said Thank You: RetrofitTools

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

More
7 years 5 months ago #135008 by cmorley
It is possible to add graphics objects to gremlin with programming - I dabbled with it in qtvcp - but as far as I know no-one has demoed a practical working example.

In qtvcp one had to use opengl programming do make the shape.
None of it is documented.

Chris M
The following user(s) said Thank You: RetrofitTools

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

More
7 years 5 months ago #135012 by pl7i92
you may look into the tread of show new Gui there are files of redy made graphics for gscrren(preferd) and gmoccapy

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

More
7 years 5 months ago #135206 by andypugh
You can also use an SVG file for a canvas, but positioning control on it can be a bit awkward. I used a table with many, many, empty cells when I did this:
forum.linuxcnc.org/41-guis/26550-lathe-macros?start=150#82743
The following user(s) said Thank You: RetrofitTools

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

More
7 years 5 months ago #135221 by cmorley

cmorley wrote: It is possible to add graphics objects to gremlin with programming - I dabbled with it in qtvcp - but as far as I know no-one has demoed a practical working example.

In qtvcp one had to use opengl programming do make the shape.
None of it is documented.

Chris M


Maybe I miss understood - did you want to add custom objects to linuxcnc's graphics gcode view or graphics to widgets?

Chris

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

Moderators: HansU
Time to create page: 0.271 seconds
Powered by Kunena Forum