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

More
23 Jan 2019 07:20 - 23 Jan 2019 07:23 #124648 by KevKim
Hey guyz,
noob here,

I have installed .iso distribution, and installed 2.8 pre, updated to most recent version and trying many things inside virtual machine.
Currently using Mach3/ESS/AC servos and I think my next build would be LCNC+digital servos with mesa cards.

One of the things I mostly would like to do is to build a new GUI.
I've been reading related articles - glade, gladevcp and so on - for many days now and I think it might be doable even though slow and tedious, love to chhallenge..
BTW, I don't mean to be very professional or commercial-like. I am not skillful enough to implement all the stuffs.
- not quite familiar with HAL structure and programming languages yet

Attached is a draft using glade(with yellowish icon, I read this is the right version for the task)
it is only partially working at the moment.



A few questions here - and yes, these can be very stupid ones to experts' eyes

- Can I make most of status windows as mouse-clickable/input directly enabled? like, click DRO and input numbers using keyboards or click tool number window and input 2, like that. If yes, does it involve lots of programming or simply by using widgets? I played with some widgets but nothing seems to be ready for direct input to that window

- Can I use custom image icons for all major click buttons? (I believe I can)
: and then, should I need to make two images as one set for unpressed/pressed status when clicking mouse?

- Can I use background images for the DRO and other status windows? like a green LCD window (or some other colors, not hurting eyes but still can grab eyes)

- image label applicable to notebook tab labels?

sorry in advance if my questions are too low graded.

Kevin
Attachments:
Last edit: 23 Jan 2019 07:23 by KevKim.

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

More
23 Jan 2019 09:39 #124651 by cmorley

KevKim wrote: A few questions here - and yes, these can be very stupid ones to experts' eyes

- Can I make most of status windows as mouse-clickable/input directly enabled? like, click DRO and input numbers using keyboards or click tool number window and input 2, like that. If yes, does it involve lots of programming or simply by using widgets? I played with some widgets but nothing seems to be ready for direct input to that window

- Can I use custom image icons for all major click buttons? (I believe I can)
: and then, should I need to make two images as one set for unpressed/pressed status when clicking mouse?

- Can I use background images for the DRO and other status windows? like a green LCD window (or some other colors, not hurting eyes but still can grab eyes)

- image label applicable to notebook tab labels?

sorry in advance if my questions are too low graded.

Kevin


Hey Kevin.

Those are not low grade questions.
In general, your creativity, skill and mostly time, are the real limiting factors in screen building.

Making widgets clickable to enter data is possible but most are not built that way in gladevcp.
So you could build new or update old widget for this or use event windows to catch clicks and call functions.
This would be some of programming, but probably more time spent learning how to put the bits together.

generally I would suggest using themes for images on buttons etc - particularly if there are lots to do.
You can also do it programmatically. Usually there needs to be images for on/off/un-sensitive and sometime 'pre-light'
It depends on how the widgets works - you can sometimes get away with images for on/off and just darken it for un-sensitive state.

I am pretty sure you could add images as backgrounds to most widgets (programically) changing the color is possible.
Details depend on the widget.

- image label applicable to notebook tab labels? Not exactly sure what you mean but if it means can you add images to notebook tabs - yes just delete the label and add a image widget.

I will also add that in master there is a new screen building system Qtvcp. Similar idea to Gladevcp but uses QT instead of GTK.
Qtvcp is still being developed and I would be interested in ideas about needed widgets etc.
GladeVCP is Getting difficult to support moving forward - eventualy we will need to make some choices about it - probably in a few years.

Welcome to linuxcnc
Chris M

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

More
23 Jan 2019 11:56 #124658 by KevKim
thank you very much Chris,

As a noob to the system, it is very painful to find the physical location of codes which are scattered here and there.
It took me more than one hour to figure out how to make scroll bar appear at the right side of the above g-code screen simply because the source screen widget does not have that feature..... pure pain.. moreover, that glade editor crashes and disappears from the monitor randomly, very often, blowing all data change made between save which makes things worse.

A'way, it is very valuable to me to know what is possible and not, what needs MORE effort than others, etc and your advice gave me a good insight. I think it would be worth to take a look at QtVCP that you mentioned.

I appreciate your help.

regards,
Kevin

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

More
23 Jan 2019 21:53 #124685 by newbynobi
Most Stuff you asked is realized in gmoccapy, so i recommend to play a little bit with the sim configs and check the code of gmoccapy.py. Imho that can give you a good start and as it is open source, feel free to use my code
The following user(s) said Thank You: KevKim

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

More
24 Jan 2019 03:36 - 24 Jan 2019 03:37 #124709 by KevKim
I just realized that you are the author of that screen,
tyvm for your effort.
I have certain ideas but skills are not supporting ideas...sad..
I'll definitely look into the codes you made.

BTW, is it better to look into the codes with text editor or in glade environment? It looks to me like glade brings convinience but not all details. For example, I still don't know where to change whole background color of <window1>

regards,
Kevin
Last edit: 24 Jan 2019 03:37 by KevKim.

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

More
25 Jan 2019 03:13 #124788 by KevKim
phew...

just a short notice...
upgraded to glade3.8.6, now crashing when inserting hal_gremlin_plus has gone, and glade editor seems to be more stable....at least so far
playing more with ui files..

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

More
25 Jan 2019 07:18 #124795 by KevKim
this drives me crazy
after playing a bit, closed glade editor, launched again, I found HAL/VCP panel completely gone out of nowhere, probably path issue regarding catalog but I failed to find any info on where to look into.
Google returned very few related pages... in the end I am re-installing the whole disk..... /crying

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

More
25 Jan 2019 10:16 #124799 by newbynobi
You may need to start glade from an rip-environment terminal

Norbert

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

More
26 Jan 2019 12:38 - 26 Jan 2019 12:39 #124890 by KevKim
I had some progress , figured out some necessary stuffs.
Modified stock led.py to have horizontal/vertical slim type shape at number 3 & 4 which was easy once I figured where the files are located.
And I am currently drawing graphical elements one by one.


While looking into your gmoccapy.glade, there is one thing I can't quite understand how action was done.

power/estop buttons in your screen changes to another shape when toggled,
I couldn't make that action happen in my screen.
Can you briefly explain the sequence please?
This surely involves image swapping when toggle is triggered but I can't find proper location to initiate this option and their relationship.

TYVM
Kevin
Attachments:
Last edit: 26 Jan 2019 12:39 by KevKim.

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

More
27 Jan 2019 08:13 #124949 by KevKim


I think I am my wit's end for now.
I designed some buttons, and tried some hal leds and I can't figure out how to connect them to each button.
I followed John's tutorial and all other available documents in LCNC sites but to a noob like me, documents are missing something.

I guess mytestui.py needs something to make this connection, is this correct?
If yes, where to learn these stuffs? like syntax for scripts and etc....
Its hard to get to right direction....

Kevin
Attachments:

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

Moderators: mhaberler
Time to create page: 0.179 seconds
Powered by Kunena Forum