| 82 | |
| 83 | |
| 84 | QVariant GenericExportsModel::data(const QModelIndex& index, int role) const |
| 85 | { |
| 86 | switch (role) |
| 87 | { |
| 88 | case Qt::DisplayRole: |
| 89 | if (role != Qt::DisplayRole) |
| 90 | return QVariant(); |
| 91 | if (!index.isValid() || index.row() >= (int)m_entries.size()) |
| 92 | return QVariant(); |
| 93 | if (index.column() == AddressColumn) |
| 94 | return QString("0x") + QString::number(m_entries[index.row()]->GetAddress(), 16); |
| 95 | if (index.column() == NameColumn) |
| 96 | return QString::fromStdString(m_entries[index.row()]->GetFullName()); |
| 97 | if (index.column() == OrdinalColumn) |
| 98 | return QString::number(m_entries[index.row()]->GetOrdinal()); |
| 99 | break; |
| 100 | case Qt::ForegroundRole: |
| 101 | if (index.column() == AddressColumn) |
| 102 | return getThemeColor(AddressColor); |
| 103 | if (index.column() == NameColumn) |
| 104 | return getThemeColor(ExportColor); |
| 105 | break; |
| 106 | default: |
| 107 | break; |
| 108 | } |
| 109 | |
| 110 | return QVariant(); |
| 111 | } |
| 112 | |
| 113 | |
| 114 | QVariant GenericExportsModel::headerData(int section, Qt::Orientation orientation, int role) const |
nothing calls this directly
no test coverage detected