| 34 | |
| 35 | |
| 36 | QVariant 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 | |
| 62 | QVariant GenericEntryModel::headerData(int section, Qt::Orientation orientation, int role) const |
nothing calls this directly
no test coverage detected