-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gui: add WaiterOverlay. To display processing wheel on top of another widget #3876
Conversation
Please remember to remove this poor |
As reminder
|
018dcff
to
f68529b
Compare
I think it would be better to deprecate |
Originally I wanted to deprecate it ( |
Yes it is here: silx/src/silx/gui/plot/PlotWidget.py Lines 3302 to 3307 in f68529b
And could be used as a special case for handling resize. |
28da0ee
to
941aeea
Compare
src/silx/gui/utils/waiteroverlay.py
Outdated
# register to resize event | ||
parent.installEventFilter(self) | ||
|
||
def setText(self, text: str): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For completeness, it would be good to have a getText
method and docstrings for the public API
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 For 'homogeneity' I might go for a text() -> str
if this is fine with you
src/silx/gui/utils/waiteroverlay.py
Outdated
if isinstance(parent, PlotWidget): | ||
parent = parent.getWidgetHandle() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can simplify the parenting, I'll make you a PR if I have a working solution
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And parenting by with getWidgetHandle()
, the change of backend needs to be handled, or the widget will disappear
Finally you have to use I can to the job if you like. As you already have a |
This is done (with other things) in #3912 |
What is the status of this PR? |
I think it is ready for review now :) |
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
…ty instead of setWaiting
…on (more intuitive)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
It would be good to add the example to the doc, here: https://github.com/silx-kit/silx/blob/main/doc/source/sample_code/index.rst
And to add the WaitingOverlay
to the API doc: https://github.com/silx-kit/silx/tree/main/doc/source/modules/gui/widgets
Co-authored-by: Thomas VINCENT <[email protected]>
Co-authored-by: Thomas VINCENT <[email protected]>
Changelog:
add a silx.gui.widgets.WaitingOverlay
TODO
silx.gui.plot.ImageStack._PlotWithWaitingLabel
to use theWaitingOverlay
insteadextra
close #3807
screenshot