Flexible GUI
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						03 Feb 2024 12:42		 -  14 Jun 2024 20:07		#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
					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: 14 Jun 2024 20:07  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.
- blazini36
 - Offline
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 972
 - Thank you received: 167
 
			
	
						04 Feb 2024 20:38				#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?
					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.
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						05 Feb 2024 11:49				#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
					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.
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						05 Feb 2024 14:04		 -  14 Jun 2024 20:08		#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
					gnipsel.com/linuxcnc/flexgui/index.html
JT
		Last edit: 14 Jun 2024 20:08  by JT.			
			Please Log in or Create an account to join the conversation.
- blazini36
 - Offline
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 972
 - Thank you received: 167
 
			
	
						05 Feb 2024 18:09				#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
					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.
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						05 Feb 2024 18:42				#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
					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.
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						06 Feb 2024 15:18				#292661
		by JT
	
	
		
			
				
The idea is you create a button for example with a few dynamic properties and the code "discovers" them and makes the pins and connects the button to HAL.
I'm thinking at this point having at least the following dynamic properties (you add them by clicking on the green plus sign in Property Editor for the object and adding a string property.
JT
					
	
	
			 		
													
	
				Replied by JT on topic Flexible GUI			
			Thanks to Chris helping me figure out why the HAL pins were not showing up I'll have HAL pins connected to widgets by tomorrow!I'd think you can just have the Python handler create a component and export hal pins straight out of Python right?
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
The idea is you create a button for example with a few dynamic properties and the code "discovers" them and makes the pins and connects the button to HAL.
I'm thinking at this point having at least the following dynamic properties (you add them by clicking on the green plus sign in Property Editor for the object and adding a string property.
Name     Property
function hal
pin_1      name, type, direction
pin_2       input, hal_bit, hal_inJT
		The following user(s) said Thank You: tommylight 	
			Please Log in or Create an account to join the conversation.
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						07 Feb 2024 13:29		 -  07 Feb 2024 19:25		#292739
		by JT
	
	
		
			
	
	
			 		
													
	
				Replied by JT on topic Flexible GUI			
			
				Got the MDI button code working.
You may notice the DRO pausing while running the MDI command and that has been fixed.
JT
					You may notice the DRO pausing while running the MDI command and that has been fixed.
JT
		Last edit: 07 Feb 2024 19:25  by JT.			
	
		The following user(s) said Thank You: tommylight 	
			Please Log in or Create an account to join the conversation.
- blazini36
 - Offline
 - Platinum Member
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 972
 - Thank you received: 167
 
			
	
						07 Feb 2024 16:36				#292756
		by blazini36
	
	
		
			
	
			
			 		
													
	
				Replied by blazini36 on topic Flexible GUI			
			
				What is  the "Plot" tab? is that supposed to be Gremlin? Didn't seem to show anything when I ran the example.			
					Please Log in or Create an account to join the conversation.
- JT
 - 
				
									Topic Author
											 - Away
 - Administrator
 - 
				
			 
		Less
		More
		
			
	
		- Posts: 1033
 - Thank you received: 536
 
			
	
						07 Feb 2024 17:17				#292761
		by JT
	
	
		
			
				
JT
					
	
			
			 		
													
	
				Replied by JT on topic Flexible GUI			
			No it's not gremlin, it's a brand new plotter based on PyQt6 and OpenGL... just not done yet. Everything in Flex GUI is based on the latest tools so it will last a long time I hope.What is the "Plot" tab? is that supposed to be Gremlin? Didn't seem to show anything when I ran the example.
JT
Please Log in or Create an account to join the conversation.
		Time to create page: 0.203 seconds