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

Method __init__

python/examples/hellopane.py:58–92  ·  view source on GitHub ↗
(self, data)

Source from the content-addressed store, hash-verified

56# Pane widget itself. This can be any QWidget.
57class HelloPaneWidget(QWidget, UIContextNotification):
58 def __init__(self, data):
59 global instance_id
60 QWidget.__init__(self)
61 self.actionHandler = UIActionHandler()
62 self.actionHandler.setupActionHandler(self)
63 offset_layout = QHBoxLayout()
64 offset_layout.addWidget(QLabel("Offset: "))
65 self.offset = QLabel(hex(0))
66 offset_layout.addWidget(self.offset)
67 offset_layout.setAlignment(QtCore.Qt.AlignCenter)
68 datatype_layout = QHBoxLayout()
69 datatype_layout.addWidget(QLabel("Data Type: "))
70 self.datatype = QLabel("")
71 datatype_layout.addWidget(self.datatype)
72 datatype_layout.setAlignment(QtCore.Qt.AlignCenter)
73 layout = QVBoxLayout()
74 title = QLabel("Hello Pane", self)
75 title.setAlignment(QtCore.Qt.AlignCenter)
76 instance = QLabel("Instance: " + str(instance_id), self)
77 instance.setAlignment(QtCore.Qt.AlignCenter)
78 layout.addStretch()
79 layout.addWidget(title)
80 layout.addWidget(instance)
81 layout.addLayout(datatype_layout)
82 layout.addLayout(offset_layout)
83 layout.addStretch()
84 self.setLayout(layout)
85 instance_id += 1
86 self.data = data
87
88 # Populate initial state
89 self.updateState()
90
91 # Set up view and address change notifications
92 self.notifications = HelloNotifications(self)
93
94 def updateState(self):
95 # Get the currently active view frame for this group of panes. There can be

Callers 1

__init__Method · 0.45

Calls 3

updateStateMethod · 0.95
HelloNotificationsClass · 0.85
UIActionHandlerClass · 0.50

Tested by

no test coverage detected