WaitingPushButton
: Button with waiting status¶
WaitingPushButton module
-
class
silx.gui.widgets.WaitingPushButton.
WaitingPushButton
(parent=None, text=None, icon=None)[source]¶ Button which allows to display a waiting status when, for example, something is still computing.
The component is graphically disabled when it is in waiting. Then we overwrite the enabled method to dissociate the 2 concepts: graphically enabled/disabled, and enabled/disabled
-
sizeHint
()[source]¶ Returns the recommended size for the widget.
This implementation of the recommended size always consider there is an icon. In this way it avoid to update the layout when the waiting icon is displayed.
-
setDisabledWhenWaiting
(isDisabled)[source]¶ Enable or disable the auto disable behaviour when the button is waiting.
Parameters: isDisabled (bool) – Enable the auto-disable behaviour
-
isDisabledWhenWaiting
()[source]¶ Returns true if the button is auto disabled when it is waiting.
Return type: bool
-
disabledWhenWaiting
¶ Property to enable/disable the auto disabled state when the button is waiting.
-
setIcon
(icon)[source]¶ Set the button icon. If the button is waiting, the icon is not visible directly, but will be visible when the waiting state will be removed.
Parameters: icon (qt.QIcon) – An icon
-
getIcon
()[source]¶ Returns the icon set to the button. If the widget is waiting it is not returning the visible icon, but the one requested by the application (the one displayed when the widget is not in waiting state).
Return type: qt.QIcon
-
icon
¶ Property providing access to the icon.
-
setEnabled
(enabled)[source]¶ Set the enabled state of the widget.
Parameters: enabled (bool) – The enabled state
-
enabled
¶ Property providing access to the enabled state of the widget
-