napari.qt.QtViewer#

class napari.qt.QtViewer(viewer: ViewerModel, show_welcome_screen: bool = False)[source]#

Bases: QSplitter

Qt view for the napari Viewer model.

Parameters:
  • viewer (napari.components.ViewerModel) – Napari viewer containing the rendered scene, layers, and controls.

  • show_welcome_screen (bool, optional) – Flag to show a welcome message when no layers are present in the canvas. Default is False.

canvas#

Canvas for rendering the current view.

Type:

vispy.scene.SceneCanvas

console#

IPython console terminal integrated into the napari GUI.

Type:

QtConsole

controls#

Qt view for GUI controls.

Type:

QtLayerControlsContainer

dims#

Dimension sliders; Qt View for Dims model.

Type:

napari.qt_dims.QtDims

dockConsole#

QWidget wrapped in a QDockWidget with forwarded viewer events.

Type:

QtViewerDockWidget

dockLayerControls#

QWidget wrapped in a QDockWidget with forwarded viewer events.

Type:

QtViewerDockWidget

dockLayerList#

QWidget wrapped in a QDockWidget with forwarded viewer events.

Type:

QtViewerDockWidget

layerButtons#

Button controls for napari layers.

Type:

QtLayerButtons

layers#

Qt view for LayerList controls.

Type:

QtLayerList

layer_to_visual#

Dictionary mapping napari layers with their corresponding vispy_layers.

Type:

dict

view#

View displayed by vispy canvas. Adds a vispy ViewBox as a child widget.

Type:

vispy scene widget

viewer#

Napari viewer containing the rendered scene, layers, and controls.

Type:

napari.components.ViewerModel

viewerButtons#

Button controls for the napari viewer.

Type:

QtViewerButtons

Methods

acceptDrops(self)

accessibleDescription(self)

accessibleName(self)

actionEvent(self, event)

actions(self)

activateWindow(self)

addAction(self, action)

addActions(self, actions)

addWidget(self, widget)

add_to_console_backlog(variables)

Save variables for pushing to console when it is instantiated.

adjustSize(self)

autoFillBackground(self)

backgroundRole(self)

backingStore(self)

baseSize(self)

blockSignals(self, b)

changeEvent(self, arg__1)

childAt(-> PySide2.QtWidgets.QWidget)

childEvent(self, arg__1)

children(self)

childrenCollapsible(self)

childrenRect(self)

childrenRegion(self)

clearFocus(self)

clearMask(self)

clipboard([flash])

Take a screenshot of the currently displayed screen and copy the image to the clipboard.

close(self)

closeEvent(event)

Cleanup and close.

closestLegalPosition(self, arg__1, arg__2)

colorCount(self)

connect(...)

connectNotify(self, signal)

contentsMargins(self)

contentsRect(self)

contextMenuEvent(self, event)

contextMenuPolicy(self)

count(self)

create(self[, arg__1, initializeWindow, ...])

createHandle(self)

createWinId(self)

createWindowContainer(window[, parent, flags])

cursor(self)

customEvent(self, event)

deleteLater(self)

depth(self)

destroy(self[, destroyWindow, destroySubWindows])

devType(self)

devicePixelRatio(self)

devicePixelRatioF(self)

devicePixelRatioFScale()

disconnect(...)

disconnectNotify(self, signal)

dragEnterEvent(event)

Ignore event if not dragging & dropping a file or URL to open.

dragLeaveEvent(self, event)

dragMoveEvent(self, event)

drawFrame(self, arg__1)

dropEvent(event)

Add local files and web URLS with drag and drop.

dumpObjectInfo(self)

dumpObjectTree(self)

dynamicPropertyNames(self)

effectiveWinId(self)

emit(self, arg__1, *args)

ensurePolished(self)

enterEvent(self, event)

event(self, arg__1)

eventFilter(self, watched, event)

find(arg__1)

findChild(self, arg__1[, arg__2])

findChildren(...)

focusInEvent(self, event)

focusNextChild(self)

focusNextPrevChild(self, next)

focusOutEvent(self, event)

focusPolicy(self)

focusPreviousChild(self)

focusProxy(self)

focusWidget(self)

font(self)

fontInfo(self)

fontMetrics(self)

foregroundRole(self)

frameGeometry(self)

frameRect(self)

frameShadow(self)

frameShape(self)

frameSize(self)

frameStyle(self)

frameWidth(self)

geometry(self)

getContentsMargins(self)

getRange(self, index)

grab(self[, rectangle])

grabGesture(self, type[, flags])

grabKeyboard(self)

grabMouse(-> None)

grabShortcut(self, key[, context])

graphicsEffect(self)

graphicsProxyWidget(self)

handle(self, index)

handleWidth(self)

hasFocus(self)

hasHeightForWidth(self)

hasMouseTracking(self)

hasTabletTracking(self)

height(self)

heightForWidth(self, arg__1)

heightMM(self)

hide(self)

hideEvent(self, event)

indexOf(self, w)

inherits(self, classname)

initPainter(self, painter)

initStyleOption(self, option)

inputMethodEvent(self, event)

inputMethodHints(self)

inputMethodQuery(self, arg__1)

insertAction(self, before, action)

insertActions(self, before, actions)

insertWidget(self, index, widget)

installEventFilter(self, filterObj)

internalWinId(self)

isActiveWindow(self)

isAncestorOf(self, child)

isCollapsible(self, index)

isEnabled(self)

isEnabledTo(self, arg__1)

isEnabledToTLW(self)

isFullScreen(self)

isHidden(self)

isLeftToRight(self)

isMaximized(self)

isMinimized(self)

isModal(self)

isRightToLeft(self)

isSignalConnected(self, signal)

isTopLevel(self)

isVisible(self)

isVisibleTo(self, arg__1)

isWidgetType(self)

isWindow(self)

isWindowModified(self)

isWindowType(self)

keyPressEvent(event)

Called whenever a key is pressed.

keyReleaseEvent(event)

Called whenever a key is released.

keyboardGrabber()

killTimer(self, id)

layout(self)

layoutDirection(self)

leaveEvent(self, event)

lineWidth(self)

locale(self)

logicalDpiX(self)

logicalDpiY(self)

lower(self)

mapFrom(self, arg__1, arg__2)

mapFromGlobal(self, arg__1)

mapFromParent(self, arg__1)

mapTo(self, arg__1, arg__2)

mapToGlobal(self, arg__1)

mapToParent(self, arg__1)

mask(self)

maximumHeight(self)

maximumSize(self)

maximumWidth(self)

metaObject(self)

metric(self, arg__1)

midLineWidth(self)

minimumHeight(self)

minimumSize(self)

minimumSizeHint(self)

minimumWidth(self)

mouseDoubleClickEvent(self, event)

mouseGrabber()

mouseMoveEvent(self, event)

mousePressEvent(self, event)

mouseReleaseEvent(self, event)

move(-> None)

moveEvent(self, event)

moveSplitter(self, pos, index)

moveToThread(self, thread)

nativeEvent(self, eventType, message)

nativeParentWidget(self)

nextInFocusChain(self)

normalGeometry(self)

objectName(self)

on_draw(event)

Called whenever the canvas is drawn.

on_mouse_double_click(event)

Called whenever a mouse double-click happen on the canvas

on_mouse_move(event)

Called whenever mouse moves over canvas.

on_mouse_press(event)

Called whenever mouse pressed in canvas.

on_mouse_release(event)

Called whenever mouse released in canvas.

on_mouse_wheel(event)

Called whenever mouse wheel activated in canvas.

on_resize(event)

Called whenever canvas is resized.

opaqueResize(self)

orientation(self)

overrideWindowFlags(self, type)

overrideWindowState(self, state)

paintEngine(self)

paintEvent(self, arg__1)

paintingActive(self)

palette(self)

parent(self)

parentWidget(self)

physicalDpiX(self)

physicalDpiY(self)

pos(self)

previousInFocusChain(self)

property(self, name)

raise_(self)

receivers(self, signal)

rect(self)

redirected(self, offset)

refresh(self)

registerUserData()

releaseKeyboard(self)

releaseMouse(self)

releaseShortcut(self, id)

removeAction(self, action)

removeEventFilter(self, obj)

render(, renderFlags, sourceRegion, renderFlags)

repaint(-> None  -> None  -> None)

replaceWidget(self, index, widget)

resize(-> None)

resizeEvent(self, arg__1)

restoreGeometry(self, geometry)

restoreState(self, state)

saveGeometry(self)

saveState(self)

screen(self)

screenshot([path, flash])

Take currently displayed screen and convert to an image array.

scroll(-> None)

sender(self)

senderSignalIndex(self)

setAcceptDrops(self, on)

setAccessibleDescription(self, description)

setAccessibleName(self, name)

setAttribute(self, arg__1[, on])

setAutoFillBackground(self, enabled)

setBackgroundRole(self, arg__1)

setBaseSize(-> None)

setChildrenCollapsible(self, arg__1)

setCollapsible(self, index, arg__2)

setContentsMargins(-> None)

setContextMenuPolicy(self, policy)

setCursor(self, arg__1)

setDisabled(self, arg__1)

setEnabled(self, arg__1)

setFixedHeight(self, h)

setFixedSize(-> None)

setFixedWidth(self, w)

setFocus(-> None)

setFocusPolicy(self, policy)

setFocusProxy(self, arg__1)

setFont(self, arg__1)

setForegroundRole(self, arg__1)

setFrameRect(self, arg__1)

setFrameShadow(self, arg__1)

setFrameShape(self, arg__1)

setFrameStyle(self, arg__1)

setGeometry(-> None)

setGraphicsEffect(self, effect)

setHandleWidth(self, arg__1)

setHidden(self, hidden)

setInputMethodHints(self, hints)

setLayout(self, arg__1)

setLayoutDirection(self, direction)

setLineWidth(self, arg__1)

setLocale(self, locale)

setMask(-> None)

setMaximumHeight(self, maxh)

setMaximumSize(-> None)

setMaximumWidth(self, maxw)

setMidLineWidth(self, arg__1)

setMinimumHeight(self, minh)

setMinimumSize(-> None)

setMinimumWidth(self, minw)

setMouseTracking(self, enable)

setObjectName(self, name)

setOpaqueResize(self[, opaque])

setOrientation(self, arg__1)

setPalette(self, arg__1)

setParent(-> None  -> None)

setProperty(self, name, value)

setRubberBand(self, position)

setShortcutAutoRepeat(self, id[, enable])

setShortcutEnabled(self, id[, enable])

setSizeIncrement(-> None)

setSizePolicy(-> None)

setSizes(self, list)

setStatusTip(self, arg__1)

setStretchFactor(self, index, stretch)

setStyle(self, arg__1)

setStyleSheet(self, styleSheet)

setTabOrder(arg__1, arg__2)

setTabletTracking(self, enable)

setToolTip(self, arg__1)

setToolTipDuration(self, msec)

setUpdatesEnabled(self, enable)

setVisible(self, visible)

setWhatsThis(self, arg__1)

setWindowFilePath(self, filePath)

setWindowFlag(self, arg__1[, on])

setWindowFlags(self, type)

setWindowIcon(self, icon)

setWindowIconText(self, arg__1)

setWindowModality(self, windowModality)

setWindowModified(self, arg__1)

setWindowOpacity(self, level)

setWindowRole(self, arg__1)

setWindowState(self, state)

setWindowTitle(self, arg__1)

set_welcome_visible(visible)

Show welcome screen widget.

sharedPainter(self)

show(self)

showEvent(self, event)

showFullScreen(self)

showMaximized(self)

showMinimized(self)

showNormal(self)

signalsBlocked(self)

size(self)

sizeHint(self)

sizeIncrement(self)

sizePolicy(self)

sizes(self)

stackUnder(self, arg__1)

startTimer(self, interval[, timerType])

statusTip(self)

style(self)

styleSheet(self)

tabletEvent(self, event)

testAttribute(self, arg__1)

thread(self)

timerEvent(self, event)

toggle_console_visibility([event])

Toggle console visible and not visible.

toolTip(self)

toolTipDuration(self)

topLevelWidget(self)

tr(self, arg__1[, arg__2, arg__3])

underMouse(self)

ungrabGesture(self, type)

unsetCursor(self)

unsetLayoutDirection(self)

unsetLocale(self)

update(-> None  -> None  -> None)

updateGeometry(self)

updateMicroFocus(self)

updatesEnabled(self)

visibleRegion(self)

whatsThis(self)

wheelEvent(self, event)

widget(self, index)

width(self)

widthMM(self)

winId(self)

window(self)

windowFilePath(self)

windowFlags(self)

windowHandle(self)

windowIcon(self)

windowIconText(self)

windowModality(self)

windowOpacity(self)

windowRole(self)

windowState(self)

windowTitle(self)

windowType(self)

x(self)

y(self)

Attributes

Box

DrawChildren

DrawWindowBackground

HLine

IgnoreMask

NoFrame

Panel

PdmDepth

PdmDevicePixelRatio

PdmDevicePixelRatioScaled

PdmDpiX

PdmDpiY

PdmHeight

PdmHeightMM

PdmNumColors

PdmPhysicalDpiX

PdmPhysicalDpiY

PdmWidth

PdmWidthMM

Plain

Raised

Shadow_Mask

Shape_Mask

StyledPanel

Sunken

VLine

WinPanel

console

iPython console terminal integrated into the napari GUI.

console_backlog

items to push to console when instantiated.

controls

customContextMenuRequested

destroyed

dockConsole

dockLayerControls

dockLayerList

dockPerformance

layerButtons

layers

objectNameChanged

painters

splitterMoved

staticMetaObject

viewerButtons

windowIconChanged

windowIconTextChanged

windowTitleChanged

Details

acceptDrops(self) bool#
accessibleDescription(self) str#
accessibleName(self) str#
actionEvent(self, event: PySide2.QtGui.QActionEvent) None#
actions(self) List[PySide2.QtWidgets.QAction]#
activateWindow(self) None#
addAction(self, action: PySide2.QtWidgets.QAction) None#
addActions(self, actions: Sequence[PySide2.QtWidgets.QAction]) None#
addWidget(self, widget: PySide2.QtWidgets.QWidget) None#
add_to_console_backlog(variables)[source]#

Save variables for pushing to console when it is instantiated.

This function will create weakrefs when possible to avoid holding on to too much memory unnecessarily.

Parameters:

variables (dict, str or list/tuple of str) – The variables to inject into the console’s namespace. If a dict, a simple update is done. If a str, the string is assumed to have variable names separated by spaces. A list/tuple of str can also be used to give the variable names. If just the variable names are give (list/tuple/str) then the variable values looked up in the callers frame.

adjustSize(self) None#
autoFillBackground(self) bool#
backgroundRole(self) PySide2.QtGui.QPalette.ColorRole#
backingStore(self) PySide2.QtGui.QBackingStore#
baseSize(self) PySide2.QtCore.QSize#
blockSignals(self, b: bool) bool#
changeEvent(self, arg__1: PySide2.QtCore.QEvent) None#
childAt(self, p: PySide2.QtCore.QPoint) PySide2.QtWidgets.QWidget#
childAt(self, x: int, y: int) PySide2.QtWidgets.QWidget
childEvent(self, arg__1: PySide2.QtCore.QChildEvent) None#
children(self) List[PySide2.QtCore.QObject]#
childrenCollapsible(self) bool#
childrenRect(self) PySide2.QtCore.QRect#
childrenRegion(self) PySide2.QtGui.QRegion#
clearFocus(self) None#
clearMask(self) None#
clipboard(flash=True)[source]#

Take a screenshot of the currently displayed screen and copy the image to the clipboard.

Parameters:

flash (bool) – Flag to indicate whether flash animation should be shown after the screenshot was captured.

close(self) bool#
closeEvent(event)[source]#

Cleanup and close.

Parameters:

event (qtpy.QtCore.QCloseEvent) – Event from the Qt context.

closestLegalPosition(self, arg__1: int, arg__2: int) int#
colorCount(self) int#
static connect(arg__1: PySide2.QtCore.QObject, arg__2: bytes, arg__3: Callable, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) bool#
static connect(self, arg__1: bytes, arg__2: Callable, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) bool
static connect(self, arg__1: bytes, arg__2: PySide2.QtCore.QObject, arg__3: bytes, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) bool
static connect(self, sender: PySide2.QtCore.QObject, signal: bytes, member: bytes, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) PySide2.QtCore.QMetaObject.Connection
static connect(sender: PySide2.QtCore.QObject, signal: PySide2.QtCore.QMetaMethod, receiver: PySide2.QtCore.QObject, method: PySide2.QtCore.QMetaMethod, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) PySide2.QtCore.QMetaObject.Connection
static connect(sender: PySide2.QtCore.QObject, signal: bytes, receiver: PySide2.QtCore.QObject, member: bytes, type: PySide2.QtCore.Qt.ConnectionType = PySide2.QtCore.Qt.ConnectionType.AutoConnection) PySide2.QtCore.QMetaObject.Connection
connectNotify(self, signal: PySide2.QtCore.QMetaMethod) None#
property console#

iPython console terminal integrated into the napari GUI.

Type:

QtConsole

property console_backlog#

items to push to console when instantiated.

Type:

List

contentsMargins(self) PySide2.QtCore.QMargins#
contentsRect(self) PySide2.QtCore.QRect#
contextMenuEvent(self, event: PySide2.QtGui.QContextMenuEvent) None#
contextMenuPolicy(self) PySide2.QtCore.Qt.ContextMenuPolicy#
count(self) int#
create(self, arg__1: int = 0, initializeWindow: bool = True, destroyOldWindow: bool = True) None#
createHandle(self) PySide2.QtWidgets.QSplitterHandle#
createWinId(self) None#
static createWindowContainer(window: PySide2.QtGui.QWindow, parent: Optional[PySide2.QtWidgets.QWidget] = None, flags: PySide2.QtCore.Qt.WindowFlags = Default(Qt.WindowFlags)) PySide2.QtWidgets.QWidget#
cursor(self) PySide2.QtGui.QCursor#
customEvent(self, event: PySide2.QtCore.QEvent) None#
deleteLater(self) None#
depth(self) int#
destroy(self, destroyWindow: bool = True, destroySubWindows: bool = True) None#
devType(self) int#
devicePixelRatio(self) int#
devicePixelRatioF(self) float#
static devicePixelRatioFScale() float#
static disconnect(arg__1: PySide2.QtCore.QMetaObject.Connection) bool#
static disconnect(arg__1: PySide2.QtCore.QObject, arg__2: bytes, arg__3: Callable) bool
static disconnect(self, arg__1: bytes, arg__2: Callable) bool
static disconnect(self, receiver: PySide2.QtCore.QObject, member: Optional[bytes] = None) bool
static disconnect(self, signal: bytes, receiver: PySide2.QtCore.QObject, member: bytes) bool
static disconnect(sender: PySide2.QtCore.QObject, signal: PySide2.QtCore.QMetaMethod, receiver: PySide2.QtCore.QObject, member: PySide2.QtCore.QMetaMethod) bool
static disconnect(sender: PySide2.QtCore.QObject, signal: bytes, receiver: PySide2.QtCore.QObject, member: bytes) bool
disconnectNotify(self, signal: PySide2.QtCore.QMetaMethod) None#
dragEnterEvent(event)[source]#

Ignore event if not dragging & dropping a file or URL to open.

Using event.ignore() here allows the event to pass through the parent widget to its child widget, otherwise the parent widget would catch the event and not pass it on to the child widget.

Parameters:

event (qtpy.QtCore.QDragEvent) – Event from the Qt context.

dragLeaveEvent(self, event: PySide2.QtGui.QDragLeaveEvent) None#
dragMoveEvent(self, event: PySide2.QtGui.QDragMoveEvent) None#
drawFrame(self, arg__1: PySide2.QtGui.QPainter) None#
dropEvent(event)[source]#

Add local files and web URLS with drag and drop.

For each file, attempt to open with existing associated reader (if available). If no reader is associated or opening fails, and more than one reader is available, open dialog and ask user to choose among available readers. User can choose to persist this choice.

Parameters:

event (qtpy.QtCore.QDropEvent) – Event from the Qt context.

dumpObjectInfo(self) None#
dumpObjectTree(self) None#
dynamicPropertyNames(self) List[PySide2.QtCore.QByteArray]#
effectiveWinId(self) int#
emit(self, arg__1: bytes, *args: None) bool#
ensurePolished(self) None#
enterEvent(self, event: PySide2.QtCore.QEvent) None#
event(self, arg__1: PySide2.QtCore.QEvent) bool#
eventFilter(self, watched: PySide2.QtCore.QObject, event: PySide2.QtCore.QEvent) bool#
static find(arg__1: int) PySide2.QtWidgets.QWidget#
findChild(self, arg__1: type, arg__2: str = '') object#
findChildren(self, arg__1: type, arg__2: PySide2.QtCore.QRegExp) Iterable#
findChildren(self, arg__1: type, arg__2: PySide2.QtCore.QRegularExpression) Iterable
findChildren(self, arg__1: type, arg__2: str = '') Iterable
focusInEvent(self, event: PySide2.QtGui.QFocusEvent) None#
focusNextChild(self) bool#
focusNextPrevChild(self, next: bool) bool#
focusOutEvent(self, event: PySide2.QtGui.QFocusEvent) None#
focusPolicy(self) PySide2.QtCore.Qt.FocusPolicy#
focusPreviousChild(self) bool#
focusProxy(self) PySide2.QtWidgets.QWidget#
focusWidget(self) PySide2.QtWidgets.QWidget#
font(self) PySide2.QtGui.QFont#
fontInfo(self) PySide2.QtGui.QFontInfo#
fontMetrics(self) PySide2.QtGui.QFontMetrics#
foregroundRole(self) PySide2.QtGui.QPalette.ColorRole#
frameGeometry(self) PySide2.QtCore.QRect#
frameRect(self) PySide2.QtCore.QRect#
frameShadow(self) PySide2.QtWidgets.QFrame.Shadow#
frameShape(self) PySide2.QtWidgets.QFrame.Shape#
frameSize(self) PySide2.QtCore.QSize#
frameStyle(self) int#
frameWidth(self) int#
geometry(self) PySide2.QtCore.QRect#
getContentsMargins(self) Tuple[int, int, int, int]#
getRange(self, index: int) Tuple[int, int]#
grab(self, rectangle: PySide2.QtCore.QRect = PySide2.QtCore.QRect(0, 0, -1, -1)) PySide2.QtGui.QPixmap#
grabGesture(self, type: PySide2.QtCore.Qt.GestureType, flags: PySide2.QtCore.Qt.GestureFlags = Default(Qt.GestureFlags)) None#
grabKeyboard(self) None#
grabMouse(self) None#
grabMouse(self, arg__1: PySide2.QtGui.QCursor) None
grabShortcut(self, key: PySide2.QtGui.QKeySequence, context: PySide2.QtCore.Qt.ShortcutContext = PySide2.QtCore.Qt.ShortcutContext.WindowShortcut) int#
graphicsEffect(self) PySide2.QtWidgets.QGraphicsEffect#
graphicsProxyWidget(self) PySide2.QtWidgets.QGraphicsProxyWidget#
handle(self, index: int) PySide2.QtWidgets.QSplitterHandle#
handleWidth(self) int#
hasFocus(self) bool#
hasHeightForWidth(self) bool#
hasMouseTracking(self) bool#
hasTabletTracking(self) bool#
height(self) int#
heightForWidth(self, arg__1: int) int#
heightMM(self) int#
hide(self) None#
hideEvent(self, event: PySide2.QtGui.QHideEvent) None#
indexOf(self, w: PySide2.QtWidgets.QWidget) int#
inherits(self, classname: bytes) bool#
initPainter(self, painter: PySide2.QtGui.QPainter) None#
initStyleOption(self, option: PySide2.QtWidgets.QStyleOptionFrame) None#
inputMethodEvent(self, event: PySide2.QtGui.QInputMethodEvent) None#
inputMethodHints(self) PySide2.QtCore.Qt.InputMethodHints#
inputMethodQuery(self, arg__1: PySide2.QtCore.Qt.InputMethodQuery) Any#
insertAction(self, before: PySide2.QtWidgets.QAction, action: PySide2.QtWidgets.QAction) None#
insertActions(self, before: PySide2.QtWidgets.QAction, actions: Sequence[PySide2.QtWidgets.QAction]) None#
insertWidget(self, index: int, widget: PySide2.QtWidgets.QWidget) None#
installEventFilter(self, filterObj: PySide2.QtCore.QObject) None#
internalWinId(self) int#
isActiveWindow(self) bool#
isAncestorOf(self, child: PySide2.QtWidgets.QWidget) bool#
isCollapsible(self, index: int) bool#
isEnabled(self) bool#
isEnabledTo(self, arg__1: PySide2.QtWidgets.QWidget) bool#
isEnabledToTLW(self) bool#
isFullScreen(self) bool#
isHidden(self) bool#
isLeftToRight(self) bool#
isMaximized(self) bool#
isMinimized(self) bool#
isModal(self) bool#
isRightToLeft(self) bool#
isSignalConnected(self, signal: PySide2.QtCore.QMetaMethod) bool#
isTopLevel(self) bool#
isVisible(self) bool#
isVisibleTo(self, arg__1: PySide2.QtWidgets.QWidget) bool#
isWidgetType(self) bool#
isWindow(self) bool#
isWindowModified(self) bool#
isWindowType(self) bool#
keyPressEvent(event)[source]#

Called whenever a key is pressed.

Parameters:

event (qtpy.QtCore.QEvent) – Event from the Qt context.

keyReleaseEvent(event)[source]#

Called whenever a key is released.

Parameters:

event (qtpy.QtCore.QEvent) – Event from the Qt context.

static keyboardGrabber() PySide2.QtWidgets.QWidget#
killTimer(self, id: int) None#
layout(self) PySide2.QtWidgets.QLayout#
layoutDirection(self) PySide2.QtCore.Qt.LayoutDirection#
leaveEvent(self, event: PySide2.QtCore.QEvent) None#
lineWidth(self) int#
locale(self) PySide2.QtCore.QLocale#
logicalDpiX(self) int#
logicalDpiY(self) int#
lower(self) None#
mapFrom(self, arg__1: PySide2.QtWidgets.QWidget, arg__2: PySide2.QtCore.QPoint) PySide2.QtCore.QPoint#
mapFromGlobal(self, arg__1: PySide2.QtCore.QPoint) PySide2.QtCore.QPoint#
mapFromParent(self, arg__1: PySide2.QtCore.QPoint) PySide2.QtCore.QPoint#
mapTo(self, arg__1: PySide2.QtWidgets.QWidget, arg__2: PySide2.QtCore.QPoint) PySide2.QtCore.QPoint#
mapToGlobal(self, arg__1: PySide2.QtCore.QPoint) PySide2.QtCore.QPoint#
mapToParent(self, arg__1: PySide2.QtCore.QPoint) PySide2.QtCore.QPoint#
mask(self) PySide2.QtGui.QRegion#
maximumHeight(self) int#
maximumSize(self) PySide2.QtCore.QSize#
maximumWidth(self) int#
metaObject(self) PySide2.QtCore.QMetaObject#
metric(self, arg__1: PySide2.QtGui.QPaintDevice.PaintDeviceMetric) int#
midLineWidth(self) int#
minimumHeight(self) int#
minimumSize(self) PySide2.QtCore.QSize#
minimumSizeHint(self) PySide2.QtCore.QSize#
minimumWidth(self) int#
mouseDoubleClickEvent(self, event: PySide2.QtGui.QMouseEvent) None#
static mouseGrabber() PySide2.QtWidgets.QWidget#
mouseMoveEvent(self, event: PySide2.QtGui.QMouseEvent) None#
mousePressEvent(self, event: PySide2.QtGui.QMouseEvent) None#
mouseReleaseEvent(self, event: PySide2.QtGui.QMouseEvent) None#
move(self, arg__1: PySide2.QtCore.QPoint) None#
move(self, x: int, y: int) None
moveEvent(self, event: PySide2.QtGui.QMoveEvent) None#
moveSplitter(self, pos: int, index: int) None#
moveToThread(self, thread: PySide2.QtCore.QThread) None#
nativeEvent(self, eventType: PySide2.QtCore.QByteArray, message: int) Tuple[bool, int]#
nativeParentWidget(self) PySide2.QtWidgets.QWidget#
nextInFocusChain(self) PySide2.QtWidgets.QWidget#
normalGeometry(self) PySide2.QtCore.QRect#
objectName(self) str#
on_draw(event)[source]#

Called whenever the canvas is drawn.

This is triggered from vispy whenever new data is sent to the canvas or the camera is moved and is connected in the QtViewer.

on_mouse_double_click(event)[source]#

Called whenever a mouse double-click happen on the canvas

Parameters:

event (vispy.event.Event) – The vispy event that triggered this method. The event.type will always be mouse_double_click

Notes

Note that this triggers in addition to the usual mouse press and mouse release. Therefore a double click from the user will likely triggers the following event in sequence:

  • mouse_press

  • mouse_release

  • mouse_double_click

  • mouse_release

on_mouse_move(event)[source]#

Called whenever mouse moves over canvas.

Parameters:

event (vispy.event.Event) – The vispy event that triggered this method.

on_mouse_press(event)[source]#

Called whenever mouse pressed in canvas.

Parameters:

event (vispy.event.Event) – The vispy event that triggered this method.

on_mouse_release(event)[source]#

Called whenever mouse released in canvas.

Parameters:

event (vispy.event.Event) – The vispy event that triggered this method.

on_mouse_wheel(event)[source]#

Called whenever mouse wheel activated in canvas.

Parameters:

event (vispy.event.Event) – The vispy event that triggered this method.

on_resize(event)[source]#

Called whenever canvas is resized.

eventvispy.util.event.Event

The vispy event that triggered this method.

opaqueResize(self) bool#
orientation(self) PySide2.QtCore.Qt.Orientation#
overrideWindowFlags(self, type: PySide2.QtCore.Qt.WindowFlags) None#
overrideWindowState(self, state: PySide2.QtCore.Qt.WindowStates) None#
paintEngine(self) PySide2.QtGui.QPaintEngine#
paintEvent(self, arg__1: PySide2.QtGui.QPaintEvent) None#
paintingActive(self) bool#
palette(self) PySide2.QtGui.QPalette#
parent(self) PySide2.QtCore.QObject#
parentWidget(self) PySide2.QtWidgets.QWidget#
physicalDpiX(self) int#
physicalDpiY(self) int#
pos(self) PySide2.QtCore.QPoint#
previousInFocusChain(self) PySide2.QtWidgets.QWidget#
property(self, name: bytes) Any#
raise_(self) None#
receivers(self, signal: bytes) int#
rect(self) PySide2.QtCore.QRect#
redirected(self, offset: PySide2.QtCore.QPoint) PySide2.QtGui.QPaintDevice#
refresh(self) None#
static registerUserData() int#
releaseKeyboard(self) None#
releaseMouse(self) None#
releaseShortcut(self, id: int) None#
removeAction(self, action: PySide2.QtWidgets.QAction) None#
removeEventFilter(self, obj: PySide2.QtCore.QObject) None#
render(self, painter: PySide2.QtGui.QPainter, targetOffset: PySide2.QtCore.QPoint, sourceRegion: PySide2.QtGui.QRegion = Default(QRegion), renderFlags: PySide2.QtWidgets.QWidget.RenderFlags = Instance(QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))) None#
render(self, target: PySide2.QtGui.QPaintDevice, targetOffset: PySide2.QtCore.QPoint = Default(QPoint), sourceRegion: PySide2.QtGui.QRegion = Default(QRegion), renderFlags: PySide2.QtWidgets.QWidget.RenderFlags = Instance(QWidget.RenderFlags(QWidget.DrawWindowBackground | QWidget.DrawChildren))) None
repaint(self) None#
repaint(self, arg__1: PySide2.QtCore.QRect) None
repaint(self, arg__1: PySide2.QtGui.QRegion) None
repaint(self, x: int, y: int, w: int, h: int) None
replaceWidget(self, index: int, widget: PySide2.QtWidgets.QWidget) PySide2.QtWidgets.QWidget#
resize(self, arg__1: PySide2.QtCore.QSize) None#
resize(self, w: int, h: int) None
resizeEvent(self, arg__1: PySide2.QtGui.QResizeEvent) None#
restoreGeometry(self, geometry: PySide2.QtCore.QByteArray) bool#
restoreState(self, state: PySide2.QtCore.QByteArray) bool#
saveGeometry(self) PySide2.QtCore.QByteArray#
saveState(self) PySide2.QtCore.QByteArray#
screen(self) PySide2.QtGui.QScreen#
screenshot(path=None, flash=True)[source]#

Take currently displayed screen and convert to an image array.

Parameters:
  • path (str) – Filename for saving screenshot image.

  • flash (bool) – Flag to indicate whether flash animation should be shown after the screenshot was captured.

Returns:

image – Numpy array of type ubyte and shape (h, w, 4). Index [0, 0] is the upper-left corner of the rendered region.

Return type:

array

scroll(self, dx: int, dy: int) None#
scroll(self, dx: int, dy: int, arg__3: PySide2.QtCore.QRect) None
sender(self) PySide2.QtCore.QObject#
senderSignalIndex(self) int#
setAcceptDrops(self, on: bool) None#
setAccessibleDescription(self, description: str) None#
setAccessibleName(self, name: str) None#
setAttribute(self, arg__1: PySide2.QtCore.Qt.WidgetAttribute, on: bool = True) None#
setAutoFillBackground(self, enabled: bool) None#
setBackgroundRole(self, arg__1: PySide2.QtGui.QPalette.ColorRole) None#
setBaseSize(self, arg__1: PySide2.QtCore.QSize) None#
setBaseSize(self, basew: int, baseh: int) None
setChildrenCollapsible(self, arg__1: bool) None#
setCollapsible(self, index: int, arg__2: bool) None#
setContentsMargins(self, left: int, top: int, right: int, bottom: int) None#
setContentsMargins(self, margins: PySide2.QtCore.QMargins) None
setContextMenuPolicy(self, policy: PySide2.QtCore.Qt.ContextMenuPolicy) None#
setCursor(self, arg__1: PySide2.QtGui.QCursor) None#
setDisabled(self, arg__1: bool) None#
setEnabled(self, arg__1: bool) None#
setFixedHeight(self, h: int) None#
setFixedSize(self, arg__1: PySide2.QtCore.QSize) None#
setFixedSize(self, w: int, h: int) None
setFixedWidth(self, w: int) None#
setFocus(self) None#
setFocus(self, reason: PySide2.QtCore.Qt.FocusReason) None
setFocusPolicy(self, policy: PySide2.QtCore.Qt.FocusPolicy) None#
setFocusProxy(self, arg__1: PySide2.QtWidgets.QWidget) None#
setFont(self, arg__1: PySide2.QtGui.QFont) None#
setForegroundRole(self, arg__1: PySide2.QtGui.QPalette.ColorRole) None#
setFrameRect(self, arg__1: PySide2.QtCore.QRect) None#
setFrameShadow(self, arg__1: PySide2.QtWidgets.QFrame.Shadow) None#
setFrameShape(self, arg__1: PySide2.QtWidgets.QFrame.Shape) None#
setFrameStyle(self, arg__1: int) None#
setGeometry(self, arg__1: PySide2.QtCore.QRect) None#
setGeometry(self, x: int, y: int, w: int, h: int) None
setGraphicsEffect(self, effect: PySide2.QtWidgets.QGraphicsEffect) None#
setHandleWidth(self, arg__1: int) None#
setHidden(self, hidden: bool) None#
setInputMethodHints(self, hints: PySide2.QtCore.Qt.InputMethodHints) None#
setLayout(self, arg__1: PySide2.QtWidgets.QLayout) None#
setLayoutDirection(self, direction: PySide2.QtCore.Qt.LayoutDirection) None#
setLineWidth(self, arg__1: int) None#
setLocale(self, locale: PySide2.QtCore.QLocale) None#
setMask(self, arg__1: PySide2.QtGui.QBitmap) None#
setMask(self, arg__1: PySide2.QtGui.QRegion) None
setMaximumHeight(self, maxh: int) None#
setMaximumSize(self, arg__1: PySide2.QtCore.QSize) None#
setMaximumSize(self, maxw: int, maxh: int) None
setMaximumWidth(self, maxw: int) None#
setMidLineWidth(self, arg__1: int) None#
setMinimumHeight(self, minh: int) None#
setMinimumSize(self, arg__1: PySide2.QtCore.QSize) None#
setMinimumSize(self, minw: int, minh: int) None
setMinimumWidth(self, minw: int) None#
setMouseTracking(self, enable: bool) None#
setObjectName(self, name: str) None#
setOpaqueResize(self, opaque: bool = True) None#
setOrientation(self, arg__1: PySide2.QtCore.Qt.Orientation) None#
setPalette(self, arg__1: PySide2.QtGui.QPalette) None#
setParent(self, parent: PySide2.QtCore.QObject) None#
setParent(self, parent: PySide2.QtWidgets.QWidget) None
setParent(self, parent: PySide2.QtWidgets.QWidget, f: PySide2.QtCore.Qt.WindowFlags) None
setProperty(self, name: bytes, value: Any) bool#
setRubberBand(self, position: int) None#
setShortcutAutoRepeat(self, id: int, enable: bool = True) None#
setShortcutEnabled(self, id: int, enable: bool = True) None#
setSizeIncrement(self, arg__1: PySide2.QtCore.QSize) None#
setSizeIncrement(self, w: int, h: int) None
setSizePolicy(self, arg__1: PySide2.QtWidgets.QSizePolicy) None#
setSizePolicy(self, horizontal: PySide2.QtWidgets.QSizePolicy.Policy, vertical: PySide2.QtWidgets.QSizePolicy.Policy) None
setSizes(self, list: Sequence[int]) None#
setStatusTip(self, arg__1: str) None#
setStretchFactor(self, index: int, stretch: int) None#
setStyle(self, arg__1: PySide2.QtWidgets.QStyle) None#
setStyleSheet(self, styleSheet: str) None#
static setTabOrder(arg__1: PySide2.QtWidgets.QWidget, arg__2: PySide2.QtWidgets.QWidget) None#
setTabletTracking(self, enable: bool) None#
setToolTip(self, arg__1: str) None#
setToolTipDuration(self, msec: int) None#
setUpdatesEnabled(self, enable: bool) None#
setVisible(self, visible: bool) None#
setWhatsThis(self, arg__1: str) None#
setWindowFilePath(self, filePath: str) None#
setWindowFlag(self, arg__1: PySide2.QtCore.Qt.WindowType, on: bool = True) None#
setWindowFlags(self, type: PySide2.QtCore.Qt.WindowFlags) None#
setWindowIcon(self, icon: PySide2.QtGui.QIcon) None#
setWindowIconText(self, arg__1: str) None#
setWindowModality(self, windowModality: PySide2.QtCore.Qt.WindowModality) None#
setWindowModified(self, arg__1: bool) None#
setWindowOpacity(self, level: float) None#
setWindowRole(self, arg__1: str) None#
setWindowState(self, state: PySide2.QtCore.Qt.WindowStates) None#
setWindowTitle(self, arg__1: str) None#
set_welcome_visible(visible)[source]#

Show welcome screen widget.

sharedPainter(self) PySide2.QtGui.QPainter#
show(self) None#
showEvent(self, event: PySide2.QtGui.QShowEvent) None#
showFullScreen(self) None#
showMaximized(self) None#
showMinimized(self) None#
showNormal(self) None#
signalsBlocked(self) bool#
size(self) PySide2.QtCore.QSize#
sizeHint(self) PySide2.QtCore.QSize#
sizeIncrement(self) PySide2.QtCore.QSize#
sizePolicy(self) PySide2.QtWidgets.QSizePolicy#
sizes(self) List[int]#
stackUnder(self, arg__1: PySide2.QtWidgets.QWidget) None#
startTimer(self, interval: int, timerType: PySide2.QtCore.Qt.TimerType = PySide2.QtCore.Qt.TimerType.CoarseTimer) int#
statusTip(self) str#
style(self) PySide2.QtWidgets.QStyle#
styleSheet(self) str#
tabletEvent(self, event: PySide2.QtGui.QTabletEvent) None#
testAttribute(self, arg__1: PySide2.QtCore.Qt.WidgetAttribute) bool#
thread(self) PySide2.QtCore.QThread#
timerEvent(self, event: PySide2.QtCore.QTimerEvent) None#
toggle_console_visibility(event=None)[source]#

Toggle console visible and not visible.

Imports the console the first time it is requested.

toolTip(self) str#
toolTipDuration(self) int#
topLevelWidget(self) PySide2.QtWidgets.QWidget#
tr(self, arg__1: bytes, arg__2: bytes = b'', arg__3: int = -1) str#
underMouse(self) bool#
ungrabGesture(self, type: PySide2.QtCore.Qt.GestureType) None#
unsetCursor(self) None#
unsetLayoutDirection(self) None#
unsetLocale(self) None#
update(self) None#
update(self, arg__1: PySide2.QtCore.QRect) None
update(self, arg__1: PySide2.QtGui.QRegion) None
update(self, x: int, y: int, w: int, h: int) None
updateGeometry(self) None#
updateMicroFocus(self) None#
updatesEnabled(self) bool#
visibleRegion(self) PySide2.QtGui.QRegion#
whatsThis(self) str#
wheelEvent(self, event: PySide2.QtGui.QWheelEvent) None#
widget(self, index: int) PySide2.QtWidgets.QWidget#
width(self) int#
widthMM(self) int#
winId(self) int#
window(self) PySide2.QtWidgets.QWidget#
windowFilePath(self) str#
windowFlags(self) PySide2.QtCore.Qt.WindowFlags#
windowHandle(self) PySide2.QtGui.QWindow#
windowIcon(self) PySide2.QtGui.QIcon#
windowIconText(self) str#
windowModality(self) PySide2.QtCore.Qt.WindowModality#
windowOpacity(self) float#
windowRole(self) str#
windowState(self) PySide2.QtCore.Qt.WindowStates#
windowTitle(self) str#
windowType(self) PySide2.QtCore.Qt.WindowType#
x(self) int#
y(self) int#