Screen Options (shutdown)

More
13 Sep 2021 23:36 #220531 by snowgoer540
I've been playing around with the qtvcp screen options as a way to remind myself to park the torch near the home point before closing down so I don't have to wait so long for it to home.

At any rate, in the process, I noticed a few things/had a question.

1.  Would it be possible to change the color and or transparency of the background?
2.  Sometimes it causes the preview panel to go haywire:



3. For reasons I don't understand, the first time the popup appears, it is always low and to the right of being centered. If I click No, and then close the window again, the second (and subsequent) popup is centered.




If nothing else, I thought I'd pass along the feedback. Either way, it still helps me remember to park the torch :)
Attachments:

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

More
14 Sep 2021 02:41 #220542 by cmorley
Replied by cmorley on topic Screen Options (shutdown)
Hi Greg.

1) you should be able to but the code was broken -pushed fix
2) 3) yes every different version of qt/opengl/moon phase makes these things work differently.
It's really cool/professional when it works - I wish it was more consistent.

The shutdown message is user changeable in the preference file.
(qtplasmac sets a different message based on your sceen shot so maybe it's programmatically altered - but by default it's set from the preference file.)

I also just added 'shutdown_msg_focus_text' to the preference file.
This allow setting the focus overly text at the close event - it's bigger and hard to miss.

Chris

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

More
14 Sep 2021 02:44 #220544 by cmorley
Replied by cmorley on topic Screen Options (shutdown)
1) sorry forgot to say how.
either set it in designer -ScreenOptions, property: close_overlay_color
or in the handler file set screenoptions same property directly

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

More
14 Sep 2021 10:19 #220572 by snowgoer540
Chris,

Thanks for the quick turn around!

Understood on the versions/behaviors/moon phases. I think full moon is only a few days away, looking forward to seeing what happens then!

I did change the message in the preferences file, so that part worked well. I look forward to playing around with the other items after work.

-Greg

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

More
14 Sep 2021 20:32 #220647 by snowgoer540
A few things I came across while messing with this:

1. If I right click on "screen_options" in designer and click "Set Options", I get this error:
Resetting rcs_errors_printed because a new NML channel is being created.
Traceback (most recent call last):
  File "/home/plasma/linuxcnc-dev/lib/python/qtvcp/plugins/screenoptions_plugin.py", line 148, in updateLocation
    dialog = screenOptionsDialog(self.widget)
  File "/home/plasma/linuxcnc-dev/lib/python/qtvcp/plugins/screenoptions_plugin.py", line 86, in __init__
    self.c_notify_max_msgs = QtWidgets.QSpinBox("Notify Max Errors")
TypeError: QSpinBox(parent: QWidget = None): argument 1 has unexpected type 'str'
Aborted

2. I am wondering what "shutdown_msg_detail =" is supposed to do, it currently doesn't appear to do anything when set.

3. I'm a bit confused about setting the color. Designer shows red blue green alpha and lists it as [red, blue, green] (alpha), but I'm not sure how to translate that into the handler.
I tried using self.w.screen_option.setColor(22), and it only allows 1 number value, which basically gets me several shades of grey on guesses. Anything else causes it to crash fairly spectacularly.
I've also tried:
self.w.screen_option.setProperty('alpha', 219)
self.w.screen_option.setProperty('red', 242)
self.w.screen_option.setProperty('blue', 111)
self.w.screen_option.setProperty('green', 14)

Which doesnt do anything either. Perhaps I'm doing something wrong here. At any rate, the only way I could get it to change was to change it in designer and update the .ui file, but I'm not sure that's the best option overall.

4. Is it possible to set it via stylesheet?

Sorry for all of the questions, the designer side of things is still cumbersome to me.

Thanks for the help!

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

More
14 Sep 2021 20:45 #220650 by snowgoer540
I do enjoy the large message though :

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

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

More
14 Sep 2021 21:28 #220654 by tommylight
Plenty of "lllll" going on there ! :)
The following user(s) said Thank You: snowgoer540

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

More
14 Sep 2021 22:01 #220660 by snowgoer540

tommylight post=220654 userid=17274Plenty of "lllll" going on there ! :) 


That's because even the message is skeptical of my BS...
The following user(s) said Thank You: tommylight

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

More
14 Sep 2021 22:29 #220663 by tommylight
LOL

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

More
15 Sep 2021 03:36 - 15 Sep 2021 12:43 #220667 by cmorley
Replied by cmorley on topic Screen Options (shutdown)
1) ok pushed fix - in fact the 'set options' dialog is far behind the widget's options - i didn't fix that .
2) i pushed a fix for this too but maybe it needs a rethink. details msgs will cause a button to be shown that when pressed will show the extra info.
currently it's read and saved to the preference file. but maybe it should not be and be available for the screen builder to add last minute info for a user that is closing the app. I could also force the extra info box open at the same time.
3) you need to use a QColor object to define the colors.
# red,green,blue,alpha 0-255
color - QtGuii.QColor(0, 255, 0, 10)
self.w.screen_option.setProperty('close_overlay_color', color)

4) Yes (sorry that would have been easier for you..).
ScreenOptions{qproperty-close_overlay_color: rgba(0, 255, 0, 75%);}
Last edit: 15 Sep 2021 12:43 by cmorley.
The following user(s) said Thank You: snowgoer540

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

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