spyder.api.widgets.status#

Status bar widgets.

Classes

BaseTimerStatus([parent])

Base class for status bar widgets that update based on timers.

StatusBarWidget([parent, show_icon, ...])

Base class for status bar widgets.

class spyder.api.widgets.status.StatusBarWidget(parent=None, show_icon=True, show_label=True, show_spinner=False)[source]#

Bases: QWidget, SpyderWidgetMixin

Base class for status bar widgets.

These widgets consist by default of an icon, a label and a spinner, which are organized from left to right on that order.

You can also add any other QWidget to this layout by setting the CUSTOM_WIDGET_CLASS class attribute. It’ll be put between the label and the spinner.

ID = None#

Unique string widget identifier.

CUSTOM_WIDGET_CLASS = None#

Custom widget class to add to the default layout.

INTERACT_ON_CLICK = False#

Whether the user can interact with widget when clicked (e.g. to show a menu)

sig_clicked#

This signal is emmitted when the widget is clicked.

get_icon()[source]#

Get the widget’s icon.

set_icon()[source]#

Set the icon for the status bar widget.

set_value(value)[source]#

Set formatted text value.

get_tooltip()[source]#

Get the widget’s tooltip text.

update_tooltip()[source]#

Update tooltip for widget.

mousePressEvent(event)[source]#

Change background color when the widget is clicked.

mouseReleaseEvent(event)[source]#

Change background color and emit signal to inform the widget was clicked.

enterEvent(event)[source]#

Change background color and cursor shape on hover.

leaveEvent(event)[source]#

Restore background color when not hovering.

class spyder.api.widgets.status.BaseTimerStatus(parent=None)[source]#

Bases: StatusBarWidget

Base class for status bar widgets that update based on timers.

closeEvent(self, a0: QCloseEvent | None)[source]#
setVisible(value)[source]#

Stop timer if widget is not visible.

update_status()[source]#

Update status label widget, if widget is visible.

set_interval(interval)[source]#

Set timer interval (ms).

get_value()[source]#

Return formatted text value.