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

Method __init__

python/examples/triage/imports.py:293–317  ·  view source on GitHub ↗
(self, parent, view, data)

Source from the content-addressed store, hash-verified

291
292class ImportsTreeView(QTreeView, FilterTarget):
293 def __init__(self, parent, view, data):
294 QTreeView.__init__(self, parent)
295 FilterTarget.__init__(self)
296 self.data = data
297 self.parent = parent
298 self.view = view
299
300 # Allow view-specific shortcuts when imports are focused
301 self.actionHandler = UIActionHandler()
302 self.actionHandler.setupActionHandler(self)
303 self.actionHandler.setActionContext(lambda: self.view.actionContext())
304
305 self.model = GenericImportsModel(self.data)
306 self.setModel(self.model)
307 self.setRootIsDecorated(False)
308 self.setUniformRowHeights(True)
309 self.setSortingEnabled(True)
310 self.sortByColumn(0, Qt.AscendingOrder)
311 if self.model.ordinal_col is not None:
312 self.setColumnWidth(self.model.ordinal_col, 55)
313
314 self.setFont(binaryninjaui.getMonospaceFont(self))
315
316 self.selectionModel().currentChanged.connect(self.importSelected)
317 self.doubleClicked.connect(self.importDoubleClicked)
318
319 def importSelected(self, cur, prev):
320 sym = self.model.getSymbol(cur)

Callers

nothing calls this directly

Calls 4

GenericImportsModelClass · 0.70
UIActionHandlerClass · 0.50
__init__Method · 0.45
connectMethod · 0.45

Tested by

no test coverage detected