widgets.custom_menus
¶
Classes for custom context menus and pop-up menus.
author: |
|
---|---|
date: | 9.1.2018 |
Module Contents¶
-
widgets.custom_menus.
handle_plotting_failure
(error)[source]¶ Reports a PlottingError exception to the user.
-
class
widgets.custom_menus.
CustomContextMenu
(parent)[source]¶ Bases:
PySide2.QtWidgets.QMenu
Context menu master class for several context menus.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
add_action
(self, text, icon=QIcon(), enabled=True)[source]¶ Adds an action to the context menu.
Parameters: - text (str) – Text description of the action
- icon (QIcon) – Icon for menu item
- enabled (bool) – Is action enabled?
-
-
class
widgets.custom_menus.
ProjectItemContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu for project items both in the QTreeView and in the QGraphicsView.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
LinkContextMenu
(parent, position, index, parallel_link=None)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for connection links.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
ToolTemplateContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for Tool templates.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
DcRefContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for references view in Data Connection properties.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
DcDataContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for data view in Data Connection properties.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
ToolPropertiesContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Common context menu class for all Tool QTreeViews in Tool properties.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
ViewPropertiesContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for the references tree view of the View project item properties.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
DiFilesContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for source files view in Data Interface properties.
-
parent
¶ Parent for menu widget (ToolboxUI)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
ObjectTreeContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for object tree items in tree view form.
-
parent
¶ Parent for menu widget (TreeViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
RelationshipTreeContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for relationship tree items in tree view form.
-
parent
¶ Parent for menu widget (TreeViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
ParameterContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for object (relationship) parameter items in tree views.
-
parent
¶ Parent for menu widget (TreeViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
SimpleEditableParameterValueContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for object (relationship) parameter value items in graph views.
-
parent
¶ Parent for menu widget (TreeViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
EditableParameterValueContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for object (relationship) parameter value items in tree views.
-
parent
¶ Parent for menu widget (TreeViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
ParameterValueListContextMenu
(parent, position, index)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for parameter enum view in tree view form.
-
parent
¶ Parent for menu widget (TreeViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
index
¶ Index of item that requested the context-menu
Type: QModelIndex
-
-
class
widgets.custom_menus.
GraphViewContextMenu
(parent, position)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for qgraphics view in graph view.
-
parent
¶ Parent for menu widget (GraphViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
-
class
widgets.custom_menus.
ObjectItemContextMenu
(parent, position, graphics_item)[source]¶ Bases:
widgets.custom_menus.CustomContextMenu
Context menu class for object graphic items in graph view.
-
parent
¶ Parent for menu widget (GraphViewForm)
Type: QWidget
-
position
¶ Position on screen
Type: QPoint
-
graphics_item
¶ item that requested the menu
Type: ObjectItem (QGraphicsItem)
-
-
class
widgets.custom_menus.
CustomPopupMenu
(parent)[source]¶ Bases:
PySide2.QtWidgets.QMenu
Popup menu master class for several popup menus.
-
parent
¶ Parent widget of this pop-up menu
Type: QWidget
-
-
class
widgets.custom_menus.
AddToolTemplatePopupMenu
(parent)[source]¶ Bases:
widgets.custom_menus.CustomPopupMenu
Popup menu class for add Tool template button.
-
parent
¶ parent widget (ToolboxUI)
Type: QWidget
-
-
class
widgets.custom_menus.
ToolTemplateOptionsPopupMenu
(parent, tool)[source]¶ Bases:
widgets.custom_menus.CustomPopupMenu
Popup menu class for tool template options button in Tool item.
-
parent
¶ Parent widget of this menu (ToolboxUI)
Type: QWidget
-
-
class
widgets.custom_menus.
AddIncludesPopupMenu
(parent)[source]¶ Bases:
widgets.custom_menus.CustomPopupMenu
Popup menu class for add includes button in Tool Template widget.
-
parent
¶ Parent widget (ToolTemplateWidget)
Type: QWidget
-
-
class
widgets.custom_menus.
CreateMainProgramPopupMenu
(parent)[source]¶ Bases:
widgets.custom_menus.CustomPopupMenu
Popup menu class for add main program QToolButton in Tool Template editor.
-
parent
¶ Parent widget (ToolTemplateWidget)
Type: QWidget
-
-
class
widgets.custom_menus.
FilterMenu
(parent=None, show_empty=True)[source]¶ Bases:
PySide2.QtWidgets.QMenu
Filter menu to use together with FilterWidget in TabularViewForm.
-
class
widgets.custom_menus.
PivotTableModelMenu
(model, proxy_model, parent=None)[source]¶ Bases:
PySide2.QtWidgets.QMenu
-
_find_selected_relationships
(self, indexes)[source]¶ Find any selected tuple combinations in self.relationship_tuple_key
-
-
class
widgets.custom_menus.
PivotTableHorizontalHeaderMenu
(model, parent=None)[source]¶ Bases:
PySide2.QtWidgets.QMenu
A context menu for the horizontal header of a pivot table.
-
model
¶ a model
Type: PivotTableModel
-
parent
¶ a parent widget
Type: QWidget
-