How to show message on preferences changed
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Be nice to others! Respect the FreeCAD code of conduct!
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
How to show message on preferences changed
As a part of the custom workbench, I would like to inform a user when the value of the parameter in preference dialog for this workbench is changed that FreeCAD needs to be restarted. I could not find any python workbench with similar functionality implemented. Is there an easy way to do this from python?
Re: How to show message on preferences changed
hi
here examples for read an save parameter
1: How do I get parameters to match.
2: How do I get parameters to match
mario
here examples for read an save parameter
1: How do I get parameters to match.
2: How do I get parameters to match
mario
Maybe you need a special feature, go into Macros_recipes and Code_snippets, Topological_data_scripting.
My macros on Gist.github here complete macros Wiki and forum.
My macros on Gist.github here complete macros Wiki and forum.
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: How to show message on preferences changed
Hi mario,
Thank you for your response, but I need a way to call a function when the user changes the value of the parameter. I am not sure if there is a way to implement this callback.
Thank you for your response, but I need a way to call a function when the user changes the value of the parameter. I am not sure if there is a way to implement this callback.
Re: How to show message on preferences changed
You can connect slots to preferences input field signals and trigger an action accordingly.
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: How to show message on preferences changed
Please give details. Which parameter? Which workbench?
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact:
Re: How to show message on preferences changed
I would like to implement this in my custom workbench (I will publish it soon). But I would like to see how to implement this for an input field in preferences from python.
Re: How to show message on preferences changed
Why just not write it in the preference dialog : something like "Need application restart" ?mpetrasinovic wrote: ↑Sat Mar 28, 2020 2:52 pm I would like to implement this in my custom workbench (I will publish it soon). But I would like to see how to implement this for an input field in preferences from python.
Re: How to show message on preferences changed
This would also benefit the Addon Manager (https://github.com/FreeCAD/FreeCAD-addons/issues/95)mpetrasinovic wrote: ↑Fri Mar 27, 2020 6:56 pm As a part of the custom workbench, I would like to inform a user when the value of the parameter in preference dialog for this workbench is changed that FreeCAD needs to be restarted. I could not find any python workbench with similar functionality implemented. Is there an easy way to do this from python?
Alone you go faster. Together we go farther
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
Please mark thread [Solved]
Want to contribute back to FC? Checkout:
'good first issues' | Open TODOs and FIXMEs | How to Help FreeCAD | How to report Bugs
- mpetrasinovic
- Posts: 106
- Joined: Sat Feb 22, 2020 10:19 am
- Location: Belgrade, Serbia
- Contact: