MCPcopy Create free account
hub / github.com/cvut/qtrvsim / headerData

Method headerData

src/gui/windows/memory/memorymodel.cpp:42–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40}
41
42QVariant 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
57QVariant MemoryModel::data(const QModelIndex &index, int role) const {
58 if (role == Qt::DisplayRole || role == Qt::EditRole) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected