spinetoolbox.widgets.toolbars
Functions to make and handle QToolBars.
Module Contents
Classes
Base class for Toolbox toolbars. |
|
A plugin toolbar. |
|
Base class for Toolbox toolbars. |
|
The base items |
|
Base class for Toolbox toolbars. |
- class spinetoolbox.widgets.toolbars._TitleWidget(title, toolbar)[source]
Bases:
PySide6.QtWidgets.QWidget
- class spinetoolbox.widgets.toolbars.ToolBar(name, toolbox)[source]
Bases:
PySide6.QtWidgets.QToolBar
Base class for Toolbox toolbars.
- Parameters
name (str) – toolbar’s name
toolbox (ToolboxUI) – Toolbox main window
- set_color(color)[source]
Sets toolbar’s background color.
- Parameters
color (QColor) – background color
- set_project_actions_enabled(enabled)[source]
Enables or disables project related actions.
- Parameters
enabled (bool) – True to enable actions, False to disable
- _insert_tool_button(before, button)[source]
Inserts button into the toolbar.
- Parameters
before (QWidget) – insert before this widget
button (QToolButton) – button to add
- Returns
QAction
- _add_tool_button(button)[source]
Adds a button to the toolbar.
- Parameters
button (QToolButton) – button to add
- Returns
QAction
- _make_tool_button(icon, text, slot=None, tip=None)[source]
Makes a new tool button and adds it to the toolbar.
- Parameters
icon (QIcon) – button’s icon
text (str) – button’s text
slot (Callable) – slot where to connect button’s clicked signal
tip (str) – button’s tooltip
- Returns
created button
- Return type
QToolButton
- class spinetoolbox.widgets.toolbars.PluginToolBar(name, parent)[source]
Bases:
ToolBar
A plugin toolbar.
- Parameters
parent (ToolboxUI) – QMainWindow instance
- class spinetoolbox.widgets.toolbars.SpecToolBar(parent)[source]
Bases:
ToolBar
Base class for Toolbox toolbars.
- Parameters
name (str) – toolbar’s name
toolbox (ToolboxUI) – Toolbox main window