spinetoolbox.widgets.project_item_drag
¶
Classes for custom QListView.
- author
Marin (KTH)
- date
14.11.2018
Module Contents¶
Classes¶
Custom class with dragging support. |
|
Custom class with dragging support. |
|
Custom class with dragging support. |
|
Custom class with dragging support. |
|
Custom class with dragging support. |
|
An array of ProjectItemSpecButton that can be expanded/collapsed. |
- class spinetoolbox.widgets.project_item_drag.ProjectItemDragMixin(*args, **kwargs)[source]¶
Custom class with dragging support.
- class spinetoolbox.widgets.project_item_drag.ProjectItemButtonBase(toolbox, item_type, icon, parent=None)[source]¶
Bases:
ProjectItemDragMixin
,PySide2.QtWidgets.QToolButton
Custom class with dragging support.
- class spinetoolbox.widgets.project_item_drag.ProjectItemButton(toolbox, item_type, icon, parent=None)[source]¶
Bases:
ProjectItemButtonBase
Custom class with dragging support.
- class spinetoolbox.widgets.project_item_drag.ProjectItemSpecButton(toolbox, item_type, icon, spec_name='', parent=None)[source]¶
Bases:
ProjectItemButtonBase
Custom class with dragging support.
- class spinetoolbox.widgets.project_item_drag.ShadeProjectItemSpecButton(toolbox, item_type, icon, spec_name='', parent=None)[source]¶
Bases:
ShadeMixin
,ProjectItemSpecButton
Custom class with dragging support.
- class spinetoolbox.widgets.project_item_drag.ShadeButton[source]¶
Bases:
ShadeMixin
,PySide2.QtWidgets.QToolButton
- class spinetoolbox.widgets.project_item_drag._ChoppedIcon(icon, size)[source]¶
Bases:
PySide2.QtGui.QIcon
- class spinetoolbox.widgets.project_item_drag._ChoppedIconEngine(icon, size)[source]¶
Bases:
PySide2.QtGui.QIconEngine
- class spinetoolbox.widgets.project_item_drag.ProjectItemSpecArray(toolbox, model, item_type, icon)[source]¶
Bases:
PySide2.QtWidgets.QToolBar
An array of ProjectItemSpecButton that can be expanded/collapsed.
- Parameters
toolbox (ToolboxUI) –
model (FilteredSpecificationModel) –
item_type (str) –
icon (ColoredIcon) –
- _get_first_chopped_index(self)[source]¶
Returns the index of the first chopped action (chopped = not drawn because of space).
- Returns
list(QAction) int or NoneType
- _add_filling(self, actions, ind)[source]¶
Adds a button to fill empty space after the last visible action.
- Parameters
actions (list(QAction)) – actions
ind (int or NoneType) – index of the first chopped one or None if all are visible
- _get_filling(self, previous)[source]¶
Returns the position and size of the filling widget.
- Parameters
previous (QWidget) – last visible widget
- Returns
position x int: position y int: width int: height
- Return type
int
Populates extension menu with chopped actions.
- Parameters
actions (list(QAction)) – actions
ind (int or NoneType) – index of the first chopped one or None if all are visible