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

Method SymbolTableView

view/kernelcache/ui/kctriage.h:251–282  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

249
250public:
251 SymbolTableView(QWidget* parent, Ref<KernelCache>& cache)
252 : QTableView(parent), m_model(new QStandardItemModel(this)), m_proxyModel(new SymbolTableProxyModel(this))
253 {
254 m_proxyModel->setSourceModel(m_model);
255 setModel(m_proxyModel);
256
257 // Set up the headers
258 m_model->setColumnCount(3);
259 m_model->setHorizontalHeaderLabels({"Address", "Name", "Image"});
260 setFont(getMonospaceFont(parent));
261 setItemDelegateForColumn(0, new AddressColorDelegate(this));
262 setItemDelegateForColumn(1, new MonospaceFontDelegate(this));
263 setItemDelegateForColumn(2, new MonospaceFontDelegate(this));
264
265 // Configure view settings
266 horizontalHeader()->setSectionResizeMode(0, QHeaderView::ResizeToContents);
267 horizontalHeader()->setSectionResizeMode(1, QHeaderView::Interactive);
268 horizontalHeader()->resizeSection(1, 400);
269 horizontalHeader()->setSectionResizeMode(2, QHeaderView::Stretch);
270 setEditTriggers(QAbstractItemView::NoEditTriggers);
271 setSelectionBehavior(QAbstractItemView::SelectRows);
272 setSelectionMode(QAbstractItemView::SingleSelection);
273 verticalHeader()->setVisible(false);
274
275 setSortingEnabled(true);
276
277 BackgroundThread::create(this)->thenBackground([this, cache](){
278 m_symbols = cache->LoadAllSymbolsAndWait();
279 })->thenMainThread([this](){
280 updateSymbols();
281 })->start();
282 }
283
284 ~SymbolTableView() override = default;
285

Callers

nothing calls this directly

Calls 2

startMethod · 0.45
LoadAllSymbolsAndWaitMethod · 0.45

Tested by

no test coverage detected