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

Method data

examples/triage/entry.cpp:36–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34
35
36QVariant GenericEntryModel::data(const QModelIndex& index, int role) const
37{
38 switch (role)
39 {
40 case Qt::DisplayRole:
41 if (!index.isValid() || index.row() >= (int)m_entries.size())
42 return QVariant();
43 if (index.column() == AddressColumn)
44 return QString("0x") + QString::number(m_entries[index.row()]->GetStart(), 16);
45 if (index.column() == NameColumn)
46 return QString::fromStdString(m_entries[index.row()]->GetSymbol()->GetFullName());
47 break;
48 case Qt::ForegroundRole:
49 if (index.column() == AddressColumn)
50 return getThemeColor(AddressColor);
51 if (index.column() == NameColumn)
52 return getThemeColor(ExportColor);
53 break;
54 default:
55 break;
56 }
57
58 return QVariant();
59}
60
61
62QVariant GenericEntryModel::headerData(int section, Qt::Orientation orientation, int role) const

Callers

nothing calls this directly

Calls 4

GetFullNameMethod · 0.80
sizeMethod · 0.45
GetStartMethod · 0.45
GetSymbolMethod · 0.45

Tested by

no test coverage detected