neoscore.interface.qt.viewport

class neoscore.interface.qt.viewport.Viewport[source]

Bases: QGraphicsView

A QGraphicsView configured for use in interactive neoscore scenes.

Includes some basic hacky features.

__init__(scene: QGraphicsScene)[source]
set_auto_interaction(enabled: bool)[source]

Set whether mouse and scrollbar interaction is enabled.

wheelEvent(event)[source]

Implementation of Qt event hook for zooming with the mouse wheel.

scrollContentsBy(*args)[source]

Override of superclass scroll action to trigger a viewport update.

window_document_pos() QPointF[source]
mouseMoveEvent(self, event: Optional[QMouseEvent])[source]
mousePressEvent(self, event: Optional[QMouseEvent])[source]
mouseReleaseEvent(self, event: Optional[QMouseEvent])[source]
mouseDoubleClickEvent(self, event: Optional[QMouseEvent])[source]
keyPressEvent(self, event: Optional[QKeyEvent])[source]
keyReleaseEvent(self, event: Optional[QKeyEvent])[source]