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, QMouseEvent)[source]
mousePressEvent(self, QMouseEvent)[source]
mouseReleaseEvent(self, QMouseEvent)[source]
mouseDoubleClickEvent(self, QMouseEvent)[source]
keyPressEvent(self, QKeyEvent)[source]
keyReleaseEvent(self, QKeyEvent)[source]