spinetoolbox.spine_db_editor.widgets.custom_qgraphicsviews
¶
Classes for custom QGraphicsViews for the Entity graph view.
- authors
Savolainen (VTT), M. Marin (KTH)
- date
6.2.2018
Module Contents¶
Classes¶
QGraphicsView for the Entity Graph View. |
- class spinetoolbox.spine_db_editor.widgets.custom_qgraphicsviews.EntityQGraphicsView(parent)[source]¶
Bases:
spinetoolbox.widgets.custom_qgraphicsviews.CustomQGraphicsView
QGraphicsView for the Entity Graph View.
- Parameters
parent (QWidget) – Graph View Form’s (QMainWindow) central widget (self.centralwidget)
- setScene(self, scene)[source]¶
Sets a new scene to this view.
- Parameters
scene (ShrinkingScene) – a new scene
- _update_actions_visibility(self)[source]¶
Enables or disables actions according to current selection in the graph.
Shows hidden items.
Populates the menu ‘Add heat map’ with parameters for currently shown items in the graph.
- set_cross_hairs_items(self, relationship_class, cross_hairs_items)[source]¶
Sets ‘cross_hairs’ items for relationship creation.
- Parameters
relationship_class (dict) –
cross_hairs_items (list(QGraphicsItems)) –
- mouseMoveEvent(self, event)[source]¶
Updates the hovered object item if we’re in relationship creation mode.
- _update_cross_hairs_pos(self, pos)[source]¶
Updates the hovered object item and sets the ‘cross_hairs’ icon accordingly.
- Parameters
pos (QPoint) – the desired position in view coordinates
- contextMenuEvent(self, e)[source]¶
Shows context menu.
- Parameters
e (QContextMenuEvent) – Context menu event
- wheelEvent(self, event)[source]¶
Zooms in/out. If user has pressed the shift key, rotates instead.
- Parameters
event (QWheelEvent) – Mouse wheel event