spinetoolbox.spine_db_editor.widgets.custom_qgraphicsviews¶
Classes for custom QGraphicsViews for the Entity graph view.
| authors: |
|
|---|---|
| date: | 6.2.2018 |
Module Contents¶
Classes¶
EntityQGraphicsView |
QGraphicsView for the Entity Graph View. |
-
class
spinetoolbox.spine_db_editor.widgets.custom_qgraphicsviews.EntityQGraphicsView(parent)[source]¶ Bases:
spinetoolbox.widgets.custom_qgraphicsviews.CustomQGraphicsViewQGraphicsView for the Entity Graph View.
Parameters: parent (QWidget) – Graph View Form’s (QMainWindow) central widget (self.centralwidget) -
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
-