spinetoolbox.widgets.toolbars
¶
Functions to make and handle QToolBars.
author: |
|
---|---|
date: | 19.1.2018 |
Module Contents¶
-
class
spinetoolbox.widgets.toolbars.
ItemToolBar
(parent)[source]¶ Bases:
PySide2.QtWidgets.QToolBar
A toolbar to add items using drag and drop actions.
Parameters: parent (ToolboxUI) – QMainWindow instance -
add_draggable_widgets
(self, category_icon)[source]¶ Adds draggable widgets from the given list.
Parameters: category_icon (list) – List of tuples (item_type (str), item category (str), icon path (str))
-
remove_all
(self, checked=False)[source]¶ Slot for handling the remove all tool button clicked signal. Calls ToolboxUI remove_all_items() method.
-
execute_project
(self, checked=False)[source]¶ Slot for handling the Execute project tool button clicked signal.
-
-
class
spinetoolbox.widgets.toolbars.
DraggableWidget
(parent, pixmap, item_type, category)[source]¶ Bases:
PySide2.QtWidgets.QLabel
A draggable QLabel.
Parameters: - parent (QWidget) – Parent widget
- pixmap (QPixMap) – Picture for the label
- item_type (str) – Item type (e.g. Data Store, Data Connection, etc…)
- category (str) – Item category (e.g. Data Stores, Data Connetions, etc…)
-
class
spinetoolbox.widgets.toolbars.
ParameterTagToolBar
(parent, db_mngr, *db_maps)[source]¶ Bases:
PySide2.QtWidgets.QToolBar
A toolbar to add items using drag and drop actions.
Parameters: - parent (DataStoreForm) – tree or graph view form
- db_mngr (SpineDBManager) – the DB manager for interacting with the db
- db_maps (iter) – DiffDatabaseMapping instances