??? how to load a custom gui file ???

More
08 Sep 2021 21:01 #220004 by Roguish
How the heck does one get linuxcnc to use the local .ui file?
The docs say  ' DISPLAY = qtvcp  mygui'
DOES NOT WORK.   see the error picture below, and .ini picture.
Docs  2.8 html docs. see section 1.7  
Should be able to put all the files in the local config directory and have it work.
What's up?????
Please advise.
I just want a resizable dragon screen.

 

 
Attachments:

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

More
09 Sep 2021 00:56 #220021 by cmorley
please use the master branch docs for master branch.
BUT - In this case, they actually say the same thing as they haven't been updated yet.
here is how to do what you asked for:
in you config folder that has the INI add a folder named (in your example) mygui.
inside that add your ui and handler file (using mygui as the base name.)

but if you are starting off by just modding qtdragon there is another way that might be better.
in a terminal enter:
qtvcp copy_dialog

a dialog will pop up that will help you select a builtin screen and a destination folder and copy it over.
I didn't add the ability to add a custom name but I guess I should.
anyways you can modify that ui/handler file and it will be used instead of the regular one.
meaning the ini file will still be
DISPLAY = qtvcp qtdragon

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

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

More
09 Sep 2021 17:14 #220070 by Roguish
thank you Chris.
I did indeed check the master branch docs... all the same.
I am a firm believer and follower of RTFM.
But thanks for the direction, I will carry on, again......

BIG question: who and when are docs updated?


The docs are not clear at all about a config directory subdirectory. Seems contradictory. Master docs section is below.

1.7. Local Files

If present, local UI files in the configuration folder will be loaded instead
of the stock UI files. Local UI files allow you to use your customized
designs rather then the default screens.
QTVCP will look for a folder name MYNAME (in the launched configuration folder that holds the INI file).
In that folder QTVCP will load any of the available files; MYNAME.ui, MYNAME_handler.py and MYNAME.qss.

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

More
10 Sep 2021 01:18 #220095 by cmorley
Who ever submits docs. When ever they submit docs.
I think it's fair to say, I am the dev that oversees QTVCP stuff, though there are few major submitters.

How could I write that paragraph to make it understood better?
It's often harder for the dev to write the clearest docs cause he already knows how it was supposed to work - users need to discover it.

Thanks
Chris
The following user(s) said Thank You: Roguish, tommylight

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

More
02 Oct 2021 14:38 #222021 by Roguish
I would really like to see a simple diagram of the needed directory structure. What goes where, and maybe a few why's.
Also a few examples of the .ini file line that calls the gui....
DISPLAY = ????? xx.pref zzz.css etc, etc.....

how to load custom files....

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

More
02 Oct 2021 20:19 #222045 by Roguish
Chris.
well, I just cloned the linuxcnc dev html documents to a local directory, 51megs, and with grepWin I can find anything.........so long as I have even a little clue what to look for.
I'll keep at it.
Already have a qtdragon that is stretchable to a larger size.....mostly.

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

More
02 Oct 2021 20:38 #222048 by cmorley
(master branch)
The INI setting is here:
linuxcnc.org/docs/devel/html/gui/qtvcp.html#_ini
you can use a custom name there too of course.
Keep in mind use just the base name eg. 'customScreen' not 'customScreen.ui' etc.

Qtvcp will check the config folder for a folder with this basename.
if found it will look in it for other files such as 'customScreen.ui' and 'customScreen_handler.py' etc. 
if some or all of those files are missing, it will check the 'builtin' folders for the same, and use them.
 

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

More
02 Oct 2021 22:37 - 02 Oct 2021 22:50 #222057 by Roguish
thanks again for the reply.
i'm making some progress, but cannot seem to get the 'brushed metal' background to show, or the jog arrows.....
I know all those images are in a folder /images
Where does that folder belong? relative to the config folder?
maybe copy and paste and put the images directory where is belongs....please

/configs/mydragon
...mydragon.ini
...core_sim.hal
...simulated_home.hal
...mydragon_postgui.hal
...mydragon.var
...mydragon.pref
...mydragon.log
...mdi_history.dat
...tool.tbl
...mydragon ........(directory)
..........mydragon.ui
..........mydragon.qrc
..........mydragon.qss
..........mydragon_handler.py
..........__pycache__ (created directory)
...................mydragon_handler.cpython-37.pyc
..........qtvcp (created directory)
.................screens (created directory)
........................mydragon (created directory)
................................resources.py
................................__pycache__ (created directory)
............................................resources.cpython-37.pyc
Last edit: 02 Oct 2021 22:50 by Roguish. Reason: indentation did not work...added .....

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

More
03 Oct 2021 02:34 #222069 by cmorley

/configs/mydragon
...mydragon.ini
...core_sim.hal
...simulated_home.hal
...mydragon_postgui.hal
...mydragon.var
...mydragon.pref
...mydragon.log
...mdi_history.dat
...tool.tbl
...mydragon ........(directory)
..........mydragon.ui
..........mydragon.qrc
..........mydragon.qss
..........mydragon_handler.py
no ..........__pycache__ (created directory)
no...................mydragon_handler.cpython-37.pyc
no..........qtvcp (created directory)
no.................screens (created directory)
no........................mydragon (created directory)
no................................resources.py
no...............................__pycache__ (created directory)
no............................................resources.cpython-37.pyc


The images are referenced relatively from the builtin screen hierarchy.
you can put a copy of the images folder in configs/..
or change all the references of the images in resources file from the designer editor.

This is obviously awkward - I am deciding the best way to deal with it.
I was trying to avoid having multiple copies of the images in the repo

Chris
 

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

More
03 Oct 2021 08:43 #222078 by cmorley
I see most (all?) of the files I said no to are actually made during the running process.
I am in the process of moving the image files into the screen folder to help with customization.

A resizable dragon would be very nice!

Chris

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

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