How hard is it to build a completely new standalone GUI?

More
29 Jan 2019 06:51 #125135 by cmorley
If you launch linuxcnc from a terminal, the terminal might mention some other error messages too.

Chris M

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

More
29 Jan 2019 08:05 #125140 by KevKim
hey,

tnx for the comment, I'll check that too.
Building buttons is slower than I thought.

I could see gscreen sample uses spinbox to enter <run from here> input, but I couldn't find .hal file for that,
I couldn't catch the flow/necessary pin or action to implement that.
That also applies to all input window in tool/spindle/feedrate.
When linuxcnc system sends rpm/feed/tool info, do I use status_label or what?
I will post all files once I think main page is flooded

Attachments:

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

More
29 Jan 2019 08:19 #125141 by cmorley
Motion controller commands that are beyond what the Gladevcp actions offer, must be coded. Gscreen probably has some functions already coded so you would need to call those functions. - documents are lacking. You can gleam some info about Gscreen functions by: in a terminal type 'gscreen -F | less'
Or else you code them yourself with python using the linuxcnc library:
linuxcnc.org/docs/devel/html/config/python-interface.html

Motion controller status can be had by using status_label widgets or by using the GSTAT library and using python code.
linuxcnc.org/docs/devel/html/gui/GStat.html
The docs for GSTAT are behind - there are more options now.
The status_label widgets are new and could be extended for more options - I was lazy when i build them for someone else.

Welcome to a deep rabbit hole :)

Chris M

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

More
29 Jan 2019 08:26 #125142 by KevKim
what a deep hole!!!!
I am trapped >.<

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

More
29 Jan 2019 08:39 #125143 by KevKim
a quick thought about handling these stuffs is that.
I am not inventing that is already invented, and most stuffs are already there, somewhere in the form of python codes, and one good thing is that it doesn't demand any compile.

So in principle, I can make a separate file and ctrl+c/ctrl+v necessary blocks of codes from here and there and include that single file when GUI is loaded.

Wouldn't this be realistic rather than to study python from the beginning, become a python expert someday and then write my own codes before I die of age? :)

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

More
29 Jan 2019 08:56 #125144 by cmorley


So in principle, I can make a separate file and ctrl+c/ctrl+v necessary blocks of codes from here and there and include that single file when GUI is loaded.

You can do that - the file is the handler file - that is what it is for.

Wouldn't this be realistic rather than to study python from the beginning, become a python expert someday and then write my own codes before I die of age? :)


You need to know some python to know what to copy and paste - you don't need to be an expert - most things follow patterns.
Also there is little to copy and paste - most of the GUIs use wildly different code to do the same things.
Since you are currently using Gscreen - the Gscreen sample screens are the most relevant. (you can look at their handler files).

You can probably see why i suggested you do as much as possible with widgets :)
Since you are using master, we can extend some widgets to help (such as status_label) but as QTvcp is my main project right now, I won't be spending tons of effort to build big widgets.

I would suggest you don't build the 'deluxe' version immediately. Keep it fairly minimum and make it work. You'll learn along the way.

Chris M

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

More
29 Jan 2019 09:10 #125145 by KevKim
O great,
good to learn that the handler file is for that purpose - I didn't know hehe
Yes, ofc, I want to maximize the use of widgets, its only because widgets do not provide very detailed GUI controls, then two choices, either giving up some stuffs or looking for alternatives if available, and I am trying to judge if this approach would be feasible or not at my level of knowledge.

Now I think I get some idea of how I should treat this, it is never light and can never be done in a week. To learn more about its functional flow, can you give a favor to show me an example on how to call a very simple python code with a GTK_button made inside glade editor? That would be a stepstone for me to learn how this will work.

O btw, I just found one big secret.....
(I blame who developed python grammar..)
The reason of previous errors, I mean themes, notify, etc, was INDENT!!!
I can't believe this.... All looked same to my eyes, space or tab, but python distinguishes it. Damn it, who's idea is this !!!!!!!

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

More
29 Jan 2019 11:20 #125153 by BigJohnT
I don't want to add any confusion here but there is another way to make a GUI now and I'm finding it quite nice and very easy to build a gui.

qtpyvcp.kcjengr.com/tutorials/basic_vcp.html

JT

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

More
29 Jan 2019 12:22 #125162 by KevKim
ty JT,

I wanna try this but installation failed.
Instruction described in that page didn't work on my system, lcnc stock distribution + latest master build, some file errors here.

Install dependencies procedure says it can't find packages like E: python-pyqt5 python-dbus-mainloop.pyqt5 blah blah and then next procedure also gave me errors. Did it work on your system?

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

More
29 Jan 2019 12:40 #125163 by KevKim
NVM Chris,

Now I know the signal tab-handler is to call python code in handler.py, I'm stupid enough.... Another mystery solved, digging into python tutorial atm >.<

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

Moderators: mhaberlerHansU
Time to create page: 0.519 seconds
Powered by Kunena Forum