Add overlay relay signals and attr to our `ChartView`

plotitem_overlays
Tyler Goodlet 2022-01-21 17:02:08 -05:00
parent 4b89f7197a
commit e66b3792bb
1 changed files with 10 additions and 0 deletions

View File

@ -333,6 +333,16 @@ class ChartView(ViewBox):
'''
mode_name: str = 'view'
# "relay events" for making overlaid views work.
# NOTE: these MUST be defined here (and can't be monkey patched
# on later) due to signal construction requiring refs to be
# in place during the run of meta-class machinery.
mouseDragEventRelay = QtCore.Signal(object, object, object)
wheelEventRelay = QtCore.Signal(object, object, object)
event_relay_source: 'Optional[ViewBox]' = None
relays: dict[str, Signal] = {}
def __init__(
self,