how to make my own custom page for qtdragon_hd?

More
24 Apr 2023 22:36 #269792 by cmorley
couple of things:
can you open a terminal and type qtvcp -d NAME_OF_YOUR_PANEL
no .ui or .handler ending.
See if it finds it and displays without the main screen.

also what command are you using to load it in the INI

I pushed a simple_hal panel example to 2.9 just now.
it has a few basic HAL widgets and no handler file.
looks like i have some work to do to make this process 'user proof' :)
I just happen to be away working long nights shifts so have limited time to help for a week or so.

Chris
The following user(s) said Thank You: rodw

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

More
24 Apr 2023 23:26 - 24 Apr 2023 23:30 #269795 by rodw
Chris, Just pulled and recompiled, there must be some sort of bug biting here or I am missing a step. I always get[
Errno 2] No such file or directory: '/usr/share/qtvcp/panels/simple_hal/simple_hal.ui'
I just have to put this in
~/linuxcnc/configs/sim.qtdragon.qtdragon_xyz/qtvcp/panels/simple_hal
Is that right?

I don't understand why it wants to look in the system directory all the time.
Ini file says.
EMBED_TAB_NAME=simple_hal
EMBED_TAB_COMMAND=qtvcp simple_hal
EMBED_TAB_LOCATION=tabWidget_utilities

EDIT: it does open outside of linuxcnc
I realised that you do already have some panels already eg. test_led bit they do the same thing
Last edit: 24 Apr 2023 23:30 by rodw.

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

More
25 Apr 2023 00:02 #269796 by rodw
So I can load it with
halcmd loadusr qtvcp simple_hal
and query the hal pins with
halcmd show pin

So there is clearly something amiss with qtdragon or qtvcp logic if its looking in the wrong folder...

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

More
25 Apr 2023 02:49 #269800 by rodw
So I have taken your simple_hal example and modified it to suit my needs. Thanks. It was great to have a working example to modify.
 

I've used two groups of buttons so the columns are mutually exclusive but I need to ensure that if a button is selected, the one beside it is disabled. I'm assuming a handler is required to do this so a simple template would be great! I've only ever modified handlers before, its not clear to me how to lay it out. The current examples seem too complicated for a hello world example that simple_hal provides.

then styling to qtdragon and sort out the original problem of loading it into qtdragon.
I've attached the panel I'm working on if its of interest.


 
Attachments:

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

More
25 Apr 2023 04:45 #269807 by cmorley
Ok Rod please pull again.
Problem was on my end - I guess I never tested custom panels as embeds.

make a folder as such (custompanel can be any name you like):
INI_FOLDER/qtvcp/panels/custompanel/
add custompanel.ui
add custompanel_handler.py if needed

for exclusive toggle buttons set the exclusive and checkable properties on both buttons.
There is away to make groups so you can have separate groups of exclusive toggle buttons but I forget at the moment how to do it.
Thanks for sticking with this

Chris

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

More
25 Apr 2023 04:50 #269808 by cmorley
group boxes was what I was thinking for toggle buttons.
for radio buttons you right click and can select/make  a group

here is a sample
Attachments:

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

More
25 Apr 2023 06:43 #269814 by rodw
Chris, still got problems. Behaviour is unchanged
This time I remembered to checkout 2.9!
There are a lot of conv_x64 componets not compiling but I deleted them to build

Warning: Spoiler!

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

More
25 Apr 2023 06:45 #269815 by rodw
I also went and found your changed files and confirmed the additional code in your commit existed and it did!

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

More
25 Apr 2023 06:50 #269816 by cmorley
The error message shows the new code was not run.do you use installed or compiled or both?

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

More
25 Apr 2023 06:56 #269817 by rodw
Odd. This is a RIP system on Bullseye. I don't have a full desktop on my chromebook so I can't install from debs.
I'll try building it on a real PC.

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

Moderators: cmorley
Time to create page: 0.095 seconds
Powered by Kunena Forum