spinetoolbox.widgets.custom_qwidgets
Custom QWidgets for Filtering and Zooming.
Module Contents
Classes
Filter widget class. |
|
A QWidgetAction with custom hovering. |
|
An action with a tool bar. |
|
A toolbar on the right, with enough space to print a text beneath. |
|
A toolbar on the right, with enough space to print a text beneath. |
|
A menu item with a toolbar on the right. |
|
A custom tool bar for |
|
A titled separator. |
|
A QLabel that always wraps text. |
|
A QLabel that supports hyperlinks. |
|
A QWizards page with a log. Useful for pages that need to capture the output of a process. |
|
A read only QLabel with a QToolButton that copies the text to clipboard. |
|
A QLabel with elided text. |
|
A spinbox where undo and redo key strokes apply to the project. |
|
Dialog that lets selecting database items. |
|
Dialog that lets selecting database items. |
- class spinetoolbox.widgets.custom_qwidgets.FilterWidget(parent, make_filter_model, *args, **kwargs)[source]
Bases:
PySide6.QtWidgets.QWidget
Filter widget class.
Init class.
- Parameters
parent (QWidget, optional) – parent widget
make_filter_model (Callable) – callable that constructs the filter model
*args – arguments forwarded to
make_filter_model
**kwargs – keyword arguments forwarded to
make_filter_model
- class spinetoolbox.widgets.custom_qwidgets.CustomWidgetAction(parent=None)[source]
Bases:
PySide6.QtWidgets.QWidgetAction
A QWidgetAction with custom hovering.
Class constructor.
- Parameters
parent (QMenu) – the widget’s parent
- class spinetoolbox.widgets.custom_qwidgets.ToolBarWidgetAction(text, parent=None, compact=False)[source]
Bases:
CustomWidgetAction
An action with a tool bar.
- tool_bar
- Type
QToolBar
Class constructor.
- Parameters
parent (QMenu) – the widget’s parent
- class spinetoolbox.widgets.custom_qwidgets.ToolBarWidgetBase(text, parent=None, io_files=None)[source]
Bases:
PySide6.QtWidgets.QWidget
A toolbar on the right, with enough space to print a text beneath.
- tool_bar
- Type
QToolBar
Class constructor.
- Parameters
text (str) –
parent (QWidget) – the widget’s parent
- class spinetoolbox.widgets.custom_qwidgets.ToolBarWidget(text, parent=None, io_files=None)[source]
Bases:
ToolBarWidgetBase
A toolbar on the right, with enough space to print a text beneath.
- tool_bar
- Type
QToolBar
Class constructor.
- Parameters
text (str) –
parent (QWidget) – the widget’s parent
- class spinetoolbox.widgets.custom_qwidgets.MenuItemToolBarWidget(text, parent=None, compact=False)[source]
Bases:
ToolBarWidgetBase
A menu item with a toolbar on the right.
Class constructor.
- Parameters
text (str) –
parent (QWidget) – the widget’s parent
compact (bool) – if True, the widget uses the minimal space
- class spinetoolbox.widgets.custom_qwidgets._MenuToolBar(parent=None)[source]
Bases:
PySide6.QtWidgets.QToolBar
A custom tool bar for
MenuItemToolBarWidget
.- add_frame(left, right, title)[source]
Add frame around given actions, with given title.
- Parameters
left (QAction) –
right (QAction) –
title (str) –
- _setup_action_button(action)[source]
- Customizes the QToolButton associated with given action:
Makes sure that the text honors the action’s mnemonics.
Installs this as event filter on the button (see
self.eventFilter()
).
Must be called everytime an action is added to the tool bar.
- Parameters
action (QAction) – Action to set up
- actionEvent(ev)[source]
Updates
self._enabled
: True if at least one non-separator action is enabled, False otherwise. Emitsself.enabled_changed
accordingly.
- class spinetoolbox.widgets.custom_qwidgets.TitleWidgetAction(title, parent=None)[source]
Bases:
CustomWidgetAction
A titled separator.
Class constructor.
- Parameters
parent (QMenu) – the widget’s parent
- class spinetoolbox.widgets.custom_qwidgets.WrapLabel(text='', parent=None)[source]
Bases:
PySide6.QtWidgets.QLabel
A QLabel that always wraps text.
- class spinetoolbox.widgets.custom_qwidgets.HyperTextLabel(text='', parent=None)[source]
Bases:
WrapLabel
A QLabel that supports hyperlinks.
- class spinetoolbox.widgets.custom_qwidgets.QWizardProcessPage(parent)[source]
Bases:
PySide6.QtWidgets.QWizardPage
A QWizards page with a log. Useful for pages that need to capture the output of a process.
- class spinetoolbox.widgets.custom_qwidgets.LabelWithCopyButton(text='', parent=None)[source]
Bases:
PySide6.QtWidgets.QWidget
A read only QLabel with a QToolButton that copies the text to clipboard.
- class spinetoolbox.widgets.custom_qwidgets.ElidedLabel(*args, **kwargs)[source]
Bases:
ElidedTextMixin
,PySide6.QtWidgets.QLabel
A QLabel with elided text.
- class spinetoolbox.widgets.custom_qwidgets.HorizontalSpinBox(*args, **kwargs)[source]
Bases:
PySide6.QtWidgets.QToolBar
- class spinetoolbox.widgets.custom_qwidgets.PropertyQSpinBox[source]
Bases:
UndoRedoMixin
,PySide6.QtWidgets.QSpinBox
A spinbox where undo and redo key strokes apply to the project.
- class spinetoolbox.widgets.custom_qwidgets.SelectDatabaseItemsDialog(checked_states, ok_button_text=None, parent=None)[source]
Bases:
PySide6.QtWidgets.QDialog
Dialog that lets selecting database items.
- Parameters
checked_states (dict, optional) – checked states for each item
ok_button_text (str, optional) – alternative label for the OK button
parent (QWidget, optional) – parent widget
- class spinetoolbox.widgets.custom_qwidgets.PurgeSettingsDialog(checked_states, ok_button_text=None, parent=None)[source]
Bases:
SelectDatabaseItemsDialog
Dialog that lets selecting database items.
- Parameters
checked_states (dict, optional) – checked states for each item
ok_button_text (str, optional) – alternative label for the OK button
parent (QWidget, optional) – parent widget