NGCGui for Qtvcp with autoload feature(files attached)

More
4 years 2 months ago #248960 by Eyecon
I modified the existing ncggui implementation for qtvcp to include a simple function that loads INI configured entries for ngcgui scripts and auto load them as tabs when starting Linuxcnc any qtvcp interfaces that also loads the ncggui pannel. It's not as fancy as the pyngcgui in that it doesn't have custom configuration parameters and doesn't load the preamble/post files automatically but at least I can get my conversational scripts to autoload on my instance of qtdragon. I also modified the widget UI and handler to include checkbox to prompt for a file save. The current implementation always pops-up a file manager dialog when finalizing the features which is not always needed if auto-sending to the running instance of Linuxcnc. 

To use the modified code, the files needs to be copied to the appropriate directory(typically /usr/lib/python3/dist-packages/qtvcp/lib/qt_ngcgui for a package install of linuxcnc) and the following entries need to be added to the ini:

NGCGUI_SUBFILE : name of the NGCGUI file (including extension) to be automatically loaded
NGCGUI_SUBFILE_PATH : path of the directory where the files can be found, relative to the root of the launched Linuxcnc INI

Each NGCGUI_SUBFILE entry will create a tab and load the appropriate NGCGui file.

Error handling is poorly implemented so use at your own risk :)
Attachments:
The following user(s) said Thank You: andypugh, tommylight

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

More
4 years 2 months ago #248996 by cmorley
I integrated your code into master.
Thanks for sharing it.

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

More
4 years 2 months ago #248998 by Eyecon
That’s awesome, thank you so much!…saves me setting up a branch and all that with git!

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

More
4 years 2 months ago #249000 by Eyecon
Not sure the changes work. I don't exactly understand how the Info class works in qtvcp but I tried using NGC_SUB_PATH and NGC_SUB in the ini and the tabs are not getting created. Also not sure how the Log class works so I don't know where to find the log messages.

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

More
4 years 2 months ago #249001 by cmorley
That's what I get for not testing properly.
Please pull again - it should be fixed now.

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

More
4 years 2 months ago #249002 by Eyecon
I guess it was an issue with the qt_istat file, I literally just figured the qtvcp classes and found the issue as I saw your message, thank for the quick fix !!

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

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