Flexible GUI

More
2 years 8 months ago - 2 years 4 months ago #292304 by JT
Flexible GUI was created by JT
If anyone wants to look at the flexible GUI I'm working on it's here and the terse docs are here.

The idea is to allow users to build a GUI to fit their needs and not be forced to use some predefined GUI. There are some minimal items required, the rest are "discovered" and if there "connected" to the functions. The way this works is you have to name the buttons, labels etc with specific names. They can be placed anywhere you like in the gui. You can use built in stylesheets or use your own. I will probably rename this to Flex in the near future, but for now it's JET cause that's me. You can also use the stock ui file that I'm working with. So pretty flexible!

This is created with PyQt6 and Python 3 so it's future proofed for a few years unlike older GUI's.

JT
Last edit: 2 years 4 months ago by JT. Reason: fix link
The following user(s) said Thank You: tommylight, rodw, 0x2102, MX_Master, blazini36, MennilTossFlykune, Mecanix

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

More
2 years 8 months ago #292438 by blazini36
Replied by blazini36 on topic Flexible GUI
This sounds pretty cool, If I get around to making a GUI for my controller project I might use this....

I fired it up in my Debian VM last night and got the example working on sim. I previously installed all the qtvcp stuff on this VM so I couldn't tell if jet added hal widgets to designer. Seemed like there were more LinuxCNC widgets than I remember but it's not obvious.

If it doesn't use custom widgets, I assume based on the docs that it just grabs widgets based on the specific name that's referenced in connections.py and exports predefined hal pins? Will you be expanding the docs?
The following user(s) said Thank You: arijitdutta

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

More
2 years 8 months ago #292500 by JT
Replied by JT on topic Flexible GUI
Yes, one of the design concepts is no special widgets need be installed in a complicated way like qtvcp and qtpyvcp. No complicated coding is needed just us the Qt Designer to layout your GUI as you please with attention to widget names.

And you're correct all you have to do is name the widgets correctly and the program "finds" them and connects the widgets to the correct code. I'm attempting to make only a few widgets mandatory and the rest optional.

No HAL pins are exported everything is done with the python interface. If creating HAL pins is useful then that can be added.

And sadly the docs are a bit terse and behind development. I'll try and catch them up this morning.

Thanks for the comment and for looking it means a lot to me.

JT
The following user(s) said Thank You: tommylight

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

More
2 years 8 months ago - 2 years 4 months ago #292514 by JT
Replied by JT on topic Flexible GUI
I've updated the documents a lot and now they are located here:
gnipsel.com/linuxcnc/flexgui/index.html

JT
Last edit: 2 years 4 months ago by JT.

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

More
2 years 8 months ago #292540 by blazini36
Replied by blazini36 on topic Flexible GUI
The day we can get through making a GUI with 0 lines of extra code is a good day lol. Ive only messed with qtvcp for one UI but wound up having to go a different direction. I have build a GTK2 UI and needed alot of  help from a friend who's a software guy.

I assume this just uses all Python NML then? I can't imagine off the top of my head how a GUI with no hal pins would work out, I suppose the pins triggered off the motion component would get you through most of it but something like a random button to control a light or something might be difficult to deal with without it's own hal pins.

I'd think you can just have the Python handler create a component and export hal pins straight out of Python right? Not sure how the other frameworks create the hal pins for the widgets but I've had my friend create a Python component to add functions to standard widgets in my GTK2 UI.

I think this is a really good idea for most of us who can wire up just about anything but draw a blank stare at anything that doesn't end in .hal or .ini

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

More
2 years 8 months ago #292547 by JT
Replied by JT on topic Flexible GUI
It uses the Python Interface like other GUI's do.
linuxcnc.org/docs/stable/html/config/python-interface.html

Push Buttons, Sliders etc. that control HAL pins would need their own HAL pin. I'm thinking about how to do that with dynamic properties.

linuxcnc.org/docs/stable/html/hal/halmodule.html

JT

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

Moderators: JT
Time to create page: 0.425 seconds
Powered by Kunena Forum