How to custom UI location?
24 Apr 2018 11:11 #109539
by emptyhb
How to custom UI location? was created by emptyhb
I'm start learning how to create gui for Linuxcnc with glade and python.
First i want to put all python file of UI in one folder, but i dont now how to config Linuxcnc load UI from that folder and relative python file in there?
First i want to put all python file of UI in one folder, but i dont now how to config Linuxcnc load UI from that folder and relative python file in there?
Please Log in or Create an account to join the conversation.
01 May 2018 22:22 #109960
by andypugh
Replied by andypugh on topic How to custom UI location?
When loading a GUI via the INI file (and that's the commonest way to do it in LinuxCNC) then all paths are relative to where the INI file is.
Please Log in or Create an account to join the conversation.
31 May 2018 20:04 #111362
by cmorley
Replied by cmorley on topic How to custom UI location?
Might I suggest you use gscreen to load your UI and gscreen handler file to write your python code.
linuxcnc.org/docs/2.7/html/gui/gscreen.html
It's not super well documented but does give some basic examples in the docs.
I might add that the sample screens of gscreen's are mostly all development vehicles - they don;t always show the easiest way of doing things ( as it was a learning process).
It's easy to start with just a GLADE ui file and have gscreen display it by naming it tester (see the docs)
for instance gscreen will give you these variables for config location:
self.data.CONFIGPATH - folder from the launched configuration
self.data.SKINPATH - folder from of the avaliable skins
self.data.BASE -the base location of linuxcnc (this changes if you use RIP vrs installed )
I'm willing to add more docs of gscreen based on questions I get - gscreen's purpose is to facilitate custom screens.
If you are dead set on doing things yourself then I suggest you look at gscreen or gmoccapy code as they both can be used as example code of how to do things for GUI display.
Chris M
linuxcnc.org/docs/2.7/html/gui/gscreen.html
It's not super well documented but does give some basic examples in the docs.
I might add that the sample screens of gscreen's are mostly all development vehicles - they don;t always show the easiest way of doing things ( as it was a learning process).
It's easy to start with just a GLADE ui file and have gscreen display it by naming it tester (see the docs)
for instance gscreen will give you these variables for config location:
self.data.CONFIGPATH - folder from the launched configuration
self.data.SKINPATH - folder from of the avaliable skins
self.data.BASE -the base location of linuxcnc (this changes if you use RIP vrs installed )
I'm willing to add more docs of gscreen based on questions I get - gscreen's purpose is to facilitate custom screens.
If you are dead set on doing things yourself then I suggest you look at gscreen or gmoccapy code as they both can be used as example code of how to do things for GUI display.
Chris M
The following user(s) said Thank You: emptyhb
Please Log in or Create an account to join the conversation.
Time to create page: 0.075 seconds