spyder.api.shellconnect.main_widget#
Main widget to use in plugins that show content that comes from the IPython console, such as the Variable Explorer or Plots.
Classes
|
Main widget to use in a plugin that shows console-specific content. |
- class spyder.api.shellconnect.main_widget.ShellConnectMainWidget(*args, set_layout=True, **kwargs)[source]#
Bases:
PluginMainWidgetMain widget to use in a plugin that shows console-specific content.
Notes
This is composed of a QStackedWidget to stack widgets associated to each shell widget in the console and only show one of them at a time.
The current widget in the stack will display the content associated to the console with focus.
- current_widget()[source]#
Return the current widget in the stack.
- Returns:
The current widget.
- Return type:
QWidget
- get_focus_widget()[source]#
Get the widget to give focus to.
- Returns:
QWidget to give focus to.
- Return type:
QWidget
Notes
This is applied when the plugin’s dockwidget is raised to the top.
- update_style()[source]#
Update stylesheet and style of the widget.
This method will be called recursively on all widgets on theme change.
- count()[source]#
Return the number of widgets in the stack.
- Returns:
The number of widgets in the stack.
- Return type:
- add_shellwidget(shellwidget)[source]#
Create a new widget in the stack and associate it to shellwidget.