MCPcopy Create free account
hub / github.com/Vector35/binaryninja-api / HelloNotifications

Class HelloNotifications

python/examples/hellopane.py:35–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33# Class to handle UI context notifications. This will be used to listen for view and address
34# changes and update the pane accordingly.
35class HelloNotifications(UIContextNotification):
36 def __init__(self, widget):
37 UIContextNotification.__init__(self)
38 self.widget = widget
39
40 # __del__ will not be called because the widget owns a reference to this object. Use
41 # QWidget.destroyed event to know when to stop listening for notifications.
42 self.widget.destroyed.connect(self.destroyed)
43
44 UIContext.registerNotification(self)
45
46 def destroyed(self):
47 UIContext.unregisterNotification(self)
48
49 def OnViewChange(self, context, frame, type):
50 self.widget.updateState()
51
52 def OnAddressChange(self, context, frame, view, location):
53 self.widget.updateState()
54
55
56# Pane widget itself. This can be any QWidget.

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected