qtvcp issues

More
09 Nov 2018 23:59 - 10 Nov 2018 00:12 #120364 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I took a little break from my planned work to work on closing the onboard keyboard when not being displayed. Thus I was thinking about handling that with the keyboard toggle button but that will not work since it appear that the keyboard is called up by the embedded process as soon as it is started.

It may be beneficial to look some kind of status to see if the user wants the keyboard displayed if it does not take to long to pull it up.

In any case below is the code I have been using for killing the keyboard at gui shut down so it does not keep on adding up icons on the bottom of my display when I do a lot of starting and stopping during verification work. I think we need to find a good place to insert it.

import psutil # used for killing embedded processes

process = filter(lambda p: p.name() == "onboard", psutil.process_iter())
for i in process:
print i.name
parent_pid = i.pid
parent = psutil.Process(parent_pid)
parent.kill()

Looks like it did not keep the indentations
Last edit: 10 Nov 2018 00:12 by auto-mation-assist. Reason: added: Looks like it did not keep the indentations

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

More
10 Nov 2018 02:24 #120370 by cmorley
Replied by cmorley on topic qtvcp issues
So the onboard closing problem seems to be a product of embedding.
I believe this is going to be a difficult problem to fix.. so I'm stalling.
IIRC matchbox-keyboard closes properly.
For the current time I would add your code (nice work there by the way) in your handler file
    ###########################
    # **** closing event **** #
    ###########################
    def closing_cleanup__(self):
        # put your code here

This will be called when qtvcp closes

Chris M

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

More
10 Nov 2018 02:55 #120371 by cmorley
Replied by cmorley on topic qtvcp issues
I pushed versa's probe images to qtvcp, so you can 'overlay' your buttons.
They would be found in /share/qtvcp/images/probe_icons

In the abstractButton's heading, The property 'icon' can be set to an image filename.
You need to remove the text from the button and probably set the size from 24x24 to 48x48

Chris M

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

More
10 Nov 2018 03:00 #120372 by cmorley
Replied by cmorley on topic qtvcp issues
A couple probe buttons:

Attachments:

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

More
10 Nov 2018 08:12 #120375 by cmorley
Replied by cmorley on topic qtvcp issues
I think having the probe screen as a widget is a better idea.
Then it can be used in other ui designs or even embedded into AXIS etc.
So I pushed the beginning of the widget based on your screen work.

If you don't mind could you do your work on the widget rather then your screen?
You can add the widget to your screen immediately of course.
The two files are versa_probe.py and versa_probe.ui
They would be in lib/python/qtvcp/widgets

I just have the buttons with images print the button name when clicked for now.

Chris M

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

More
10 Nov 2018 16:49 - 10 Nov 2018 16:54 #120401 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I have suspected that the onboard keyboard is causing other issues even when it has been closed. I noticed that editing of items displayed in text editor or even a terminal window starts to have a mind of its own at times. It almost like its changing the normal keyboard to go into some special mode. The fact that the onboard keyboard has a preferences pop up can become problematic since the configuration can be changed from the home window and may not be what is expected by linuxcnc.

I think that using the probe as a widget is a better way to implement it and makes it a lot more flexible. Not sure of what exactly I need to do to make this change other than just leaving that panel blank so the widget can be placed there. I can separate the probing panel into a separate .ui and place the images on the buttons if that is needed.

I ran into a spelling error in the keybindings.py file. "Key_Retuen" should likely be
"Key_Return".

Error Msg:
no function name conversion for QT Event: 'Key_Retuen' (keybindings.py:235)

Also this warning that is not part of it:

Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
Last edit: 10 Nov 2018 16:54 by auto-mation-assist. Reason: Added warning msg

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

More
10 Nov 2018 17:00 #120403 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris,

"If you don't mind could you do your work on the widget rather then your screen?"

Yes I will do that.

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

More
11 Nov 2018 22:24 #120464 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
I'm still working on the stand alone probing panel widget and re-organizing some of its python code. The below is a snap shot of the panel.

Attachments:
The following user(s) said Thank You: tommylight

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

More
12 Nov 2018 01:15 #120470 by cmorley
Replied by cmorley on topic qtvcp issues
Looking good! I'm just working some weird hours but will be back on the project soon.

Chris M

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

More
12 Nov 2018 03:57 #120474 by auto-mation-assist
Replied by auto-mation-assist on topic qtvcp issues
Chris,

I have not seen an icon to load the probing panel widget. I can see that it is listed in qtvcp_plugin.py and it has versa_probe_plugin.py. I just don’t see an Icon to grab to drag it in if that is the only reason.

I have been ignoring this because there was so many other things to do and a lot remaining still but I would like get it loaded so I can start eliminating errors.

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

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