GTK3 branch missing widgets

More
16 Sep 2018 02:38 #117590 by blazini36
I built a custom GTK2 GUI some time ago out of necessity because the machine I use it on isn't anything a typical LinuxCNC GUI is geared towards. GTK2 has some incompatabillities with other software that I've had to work around to make all of this happen. Recently I noticed the GTK3 development branch and I've started rebuilding the GUI with a GTK3 version of Glade but it looks like not all widgets are currently working. HAL vscale is one thing I need but it seems to be missing. I suppose this has something to do with the fact that GTK3 doesn't have vscales or hscales, it just has scales that are oriented horizontally or vertically.

Is it possible to get a vertical HAL scale or is the only option to use python to "hal.set_p'' the GTK3 scale value? I haven't tried anything yet as I'm still updating the GUI, just trying to figure out what I'm gonna have to do.

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

More
16 Sep 2018 18:34 #117610 by cmorley
Replied by cmorley on topic GTK3 branch missing widgets
The gladevcp_gtk3 branch is not in any shape to be used in a production machine.
I haven't worked on it in a year it seems.
IIRC most of the widgets were converted ( to work with gtk2 or gtk3) the big glaring exception was gremlin, the graphical display.
Opengl work is not my forte, so had been a big road block.
Add to that the seemingly constant small breakage with gtk3 and GLADE not supporting importing GTK2 GLADE projects and then finally python 2 end of life...

gladeVCP is a time bomb that we are so far successfully ignoring.

I am currently busy with QTvcp - a python/QT version of VCP.
It's not incorporated in master yet but probably soon - particularly if someone needed it....

My intention is to get back to that branch but I predict it to be more like a year - unless someone built a GTK3/opengl graphics program to replace gremlin.

Chris M

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

More
16 Sep 2018 18:55 #117611 by blazini36
I don't actually have any use for Gremlin on this project. The only HAL widgets I need are the Hbar which seems to be there, and a hal vertical and horizontal scale. I'm not 100% sure I absolutely even need these 2 items as HAL widgets. HAL widgets just makes them quite a bit more convenient as they can be connected directly to HAL components without extra python code. I am curious about QT though I've only ever built a GUI in Glade.

This machine is largely based on cameras and I use LinuxCNC for handling motors and IO but things like gremlin I wouldn't be using anyway. Main reason for wanting to push a GTK3 GUI is for one a more modern look and for 2 GTK2 is incompatible with Gstreamer. I don't currently use Gstreamer as I've had to work around it nor do I know why exactly GTK2 is incompatable but I have run into issues when trying it and after looking into it I've read about incompatibility several times.

Is it right to assume that the only reason GTK3 is not actually a thing on LinuxCNC is because it lacks GladeVCP widgets? For arguments sake you could build a GUI with a standard GTK3 library in Glade with python coding the widget actions? The GUI widgets aren't exactly realtime so I assume the main purpose of HAL widgets is ease of integration and some special uses like Gremlin.

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

More
16 Sep 2018 19:31 #117612 by cmorley
Replied by cmorley on topic GTK3 branch missing widgets
What actual problem did gstreamer give?
Gstreamer was/is a problem with gmoccapy and gscreen - but I think that was worked around - sound might not work I can't remember.

GTK3 is not a thing on linuxcnc because nobody has finished a project using it.
IIRC there was work on stepconf using GTK3 and of course my gladevcp work.

If you wish to hand write a program using GTK3, that is completely possible.
You must use python2 (so that you can use the linuxcnc python libraies) (or C if you like)

Of course I would love you to try out qtvcp but that means you need to invest time to learn how to do that. It is roughly built the same as gladevcp (uses qtdesigner as an editor) some things are better somethings worse. It uses CSS for 'theming' (styles in QT speak)

bottom line is
- The gstreamer problem may be able to be fixed if you give more detail.
- QTvcp is going to be the future, sooner then GTK3
- if you want GTK3 now, you'll have to do it largely on your own.

Chris M

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

More
16 Sep 2018 19:59 #117613 by blazini36
It's been over a year since I tried to use Gstreamer so I don't recall exactly. The camera manufacturer supplies quite a bit of python plugins and they tend to use alot of Gstreamer. I encountered many issues trying to incorperate Gstreamer into a basic GUI I first made but I am not a programmer and not terribly familiar with Gstreamer. This post on the subject seems Like what I was having an issue with and the response is pretty much echoed around:

gstreamer-devel.966125.n4.nabble.com/How...exist-td4676131.html

I built a full GUI with Glade and GTK2 and a programmer I was working with was able to get the cameras displaying on the GUI with OpenCV. That's pretty much the direction I went. The python code is fairly intensive. There's actually not a whole lot of HAL widgets in the GUI as there's not a ton of use for them, mainly just a couple of scales and an Hbar

Converting the GUI to GTK3 seems relatively straight forward yet I didn't completely finish that yet as it's just something on the side right now. I may try getting the QT designer working so I can see how it is. Early on I briefly tried to get Machinekit running because it did seem to have some QT support, Machinekit seems to lack community support like LinuxCNC has and it looks like the focus is a bit far out there with tinkerers and embedded designs on tiny boards.

You mentioned programming in C, I was of the understanding that pretty much all linuxcnc programming other than components and such was in python. I assumed this had to do with linuxcnc's python libraries. I can't write any of it but I know the programmer I work with would have much preferred to use C

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

More
16 Sep 2018 21:45 #117616 by cmorley
Replied by cmorley on topic GTK3 branch missing widgets
Most of the GUI work in linuxcnc is in python because it's easier for mortal programmers.

HAL is written in C and so is GTK so that works well.
If you need status from the motion controller, that's a little more difficult as it's mostly C++

Interesting you mention opencv as the qtvcp branch use opencv for a webcam machine alignment widget. Could be used as an example for something else.
The only annoying thing about the branch is it uses python 2 and no distribution provides the libraries for integrating python2 widgets into QTdesigner - there are a couple supplied to avoid compiling -assuming you use Debian or Mint.

Chris M

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

More
16 Sep 2018 21:56 #117625 by cmorley
Replied by cmorley on topic GTK3 branch missing widgets

It's been over a year since I tried to use Gstreamer so I don't recall exactly. The camera manufacturer supplies quite a bit of python plugins and they tend to use alot of Gstreamer. I encountered many issues trying to incorperate Gstreamer into a basic GUI I first made but I am not a programmer and not terribly familiar with Gstreamer. This post on the subject seems Like what I was having an issue with and the response is pretty much echoed around:

gstreamer-devel.966125.n4.nabble.com/How...exist-td4676131.html


Yes I see the problem.
In qtvcp I got around the problem by using gstreamer outside of python; using subprocess/pipes.

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

More
22 Dec 2018 22:06 - 22 Dec 2018 22:09 #122759 by trilobyte
Today i installed glade (apt get install glade)
i get a new version of glade and get the same errrors as described in this tread.

screenshot
how can i go back to the version who is working together with linuxcnc?

Peter
Last edit: 22 Dec 2018 22:09 by trilobyte.

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

More
24 Dec 2018 20:50 #122838 by cmorley
Replied by cmorley on topic GTK3 branch missing widgets
linuxcnc uses GLADE 3.8.6.
It's not widely available for the newest distributions.
You could look here for packages that work:
www.linuxcnc.org/dists/

or compile it from sources.

Chris M

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

More
24 Dec 2018 21:01 #122841 by islander261
look at this thread Norbert has good instructions.

forum.linuxcnc.org/9-installing-linuxcnc...linux-mint-19#121786

John

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

Moderators: mhaberlerHansU
Time to create page: 1.440 seconds
Powered by Kunena Forum