dbs_annotator.models.electrode_viewer.ElectrodeCanvas

class dbs_annotator.models.electrode_viewer.ElectrodeCanvas(parent=None)[source]

Bases: QWidget

Canvas for drawing 2D electrode visualization with clickable contacts

Methods

acceptDrops

accessibleDescription

accessibleIdentifier

accessibleName

actionEvent

actions

activateWindow

addAction

addActions

adjustSize

autoFillBackground

backgroundRole

backingStore

baseSize

blockSignals

calculate_scale()

Calculate exact scale to fill the canvas with the electrode drawing.

changeEvent

childAt

childEvent

children

childrenRect

childrenRegion

clearFocus

clearMask

close

closeEvent

colorCount

connect

connectNotify

contentsMargins

contentsRect

contextMenuEvent

contextMenuPolicy

create

createWinId

createWindowContainer

cursor

customEvent

cycle_case_state()

Cycle case state: OFF -> ANODIC -> CATHODIC -> OFF

cycle_contact_state(contact_id)

Cycle contact state: OFF -> ANODIC -> CATHODIC -> OFF

deleteLater

depth

destroy

devType

devicePixelRatio

devicePixelRatioF

devicePixelRatioFScale

disconnect

disconnectNotify

dragEnterEvent

dragLeaveEvent

dragMoveEvent

dropEvent

dumpObjectInfo

dumpObjectTree

dynamicPropertyNames

effectiveWinId

emit

encodeMetricF

ensurePolished

enterEvent

event

eventFilter

find

findChild

findChildren

focusInEvent

focusNextChild

focusNextPrevChild

focusOutEvent

focusPolicy

focusPreviousChild

focusProxy

focusWidget

font

fontInfo

fontMetrics

foregroundRole

frameGeometry

frameSize

geometry

get_contact_at_pos(pos)

Return contact (contact_index, segment_index) at mouse position

get_ring_at_pos(pos)

Return ring index at mouse position

get_state_color(state[, is_hovered])

Return color based on state

grab

grabGesture

grabKeyboard

grabMouse

grabShortcut

graphicsEffect

graphicsProxyWidget

hasFocus

hasHeightForWidth

hasMouseTracking

hasTabletTracking

height

heightForWidth

heightMM

hide

hideEvent

inherits

initPainter

inputMethodEvent

inputMethodHints

inputMethodQuery

insertAction

insertActions

installEventFilter

internalWinId

isActiveWindow

isAncestorOf

isEnabled

isEnabledTo

isFullScreen

isHidden

isLeftToRight

isMaximized

isMinimized

isModal

isQmlExposed

isQuickItemType

isRightToLeft

isSignalConnected

isTopLevel

isVisible

isVisibleTo

isWidgetType

isWindow

isWindowModified

isWindowType

is_case_at_pos(pos)

Check if mouse is over the case

keyPressEvent

keyReleaseEvent

keyboardGrabber

killTimer

layout

layoutDirection

leaveEvent

locale

logicalDpiX

logicalDpiY

lower

mapFrom

mapFromGlobal

mapFromParent

mapTo

mapToGlobal

mapToParent

mask

maximumHeight

maximumSize

maximumWidth

metaObject

metric

minimumHeight

minimumSize

minimumSizeHint

minimumWidth

mouseDoubleClickEvent

mouseGrabber

mouseMoveEvent(event)

Handle hover over contacts, rings and case

mousePressEvent(event)

Handle clicks on contacts, rings and case

mouseReleaseEvent

move

moveEvent

moveToThread

nativeEvent

nativeParentWidget

nextInFocusChain

normalGeometry

objectName

overrideWindowFlags

overrideWindowState

paintEngine

paintEvent(event)

Render the electrode lead, contacts, case, and labels.

paintingActive

palette

parent

parentWidget

physicalDpiX

physicalDpiY

pos

previousInFocusChain

property

raise_

receivers

rect

redirected

releaseKeyboard

releaseMouse

releaseShortcut

removeAction

removeEventFilter

render

repaint

resize

resizeEvent(event)

Redraw when window is resized

restoreGeometry

saveGeometry

screen

scroll

sender

senderSignalIndex

setAcceptDrops

setAccessibleDescription

setAccessibleIdentifier

setAccessibleName

setAttribute

setAutoFillBackground

setBackgroundRole

setBaseSize

setContentsMargins

setContextMenuPolicy

setCursor

setDisabled

setEnabled

setFixedHeight

setFixedSize

setFixedWidth

setFocus

setFocusPolicy

setFocusProxy

setFont

setForegroundRole

setGeometry

setGraphicsEffect

setHidden

setInputMethodHints

setLayout

setLayoutDirection

setLocale

setMask

setMaximumHeight

setMaximumSize

setMaximumWidth

setMinimumHeight

setMinimumSize

setMinimumWidth

setMouseTracking

setObjectName

setPalette

setParent

setProperty

setScreen

setShortcutAutoRepeat

setShortcutEnabled

setSizeIncrement

setSizePolicy

setStatusTip

setStyle

setStyleSheet

setTabOrder

setTabletTracking

setToolTip

setToolTipDuration

setUpdatesEnabled

setVisible

setWhatsThis

setWindowFilePath

setWindowFlag

setWindowFlags

setWindowIcon

setWindowIconText

setWindowModality

setWindowModified

setWindowOpacity

setWindowRole

setWindowState

setWindowTitle

set_export_mode(enabled)

Toggle export mode (tighter padding, larger scale for PNG output).

set_model(model)

Set the electrode model and reset all states

set_ring_state(ring_idx, state)

Set state for all segments of a ring

sharedPainter

show

showEvent

showFullScreen

showMaximized

showMinimized

showNormal

signalsBlocked

size

sizeHint

sizeIncrement

sizePolicy

stackUnder

startTimer

statusTip

style

styleSheet

tabletEvent

testAttribute

thread

timerEvent

toolTip

toolTipDuration

topLevelWidget

tr

underMouse

ungrabGesture

unsetCursor

unsetLayoutDirection

unsetLocale

update

updateGeometry

updateMicroFocus

updatesEnabled

visibleRegion

whatsThis

wheelEvent

width

widthMM

winId

window

windowFilePath

windowFlags

windowHandle

windowIcon

windowIconText

windowModality

windowOpacity

windowRole

windowState

windowTitle

windowType

x

y

Attributes

customContextMenuRequested

destroyed

objectNameChanged

painters

ushort

staticMetaObject

windowIconChanged

windowIconTextChanged

windowTitleChanged