| 40 | } |
| 41 | |
| 42 | QVariant MemoryModel::headerData(int section, Qt::Orientation orientation, int role) const { |
| 43 | if (orientation == Qt::Horizontal) { |
| 44 | if (role == Qt::DisplayRole) { |
| 45 | if (section == 0) { |
| 46 | return tr("Address"); |
| 47 | } else { |
| 48 | uint32_t addr = (section - 1) * cellSizeBytes(); |
| 49 | QString ret = "+" + QString::number(addr, 10); |
| 50 | return ret; |
| 51 | } |
| 52 | } |
| 53 | } |
| 54 | return Super::headerData(section, orientation, role); |
| 55 | } |
| 56 | |
| 57 | QVariant MemoryModel::data(const QModelIndex &index, int role) const { |
| 58 | if (role == Qt::DisplayRole || role == Qt::EditRole) { |
nothing calls this directly
no outgoing calls
no test coverage detected