MCPcopy Create free account
hub / github.com/baldurk/renderdoc / addEvent

Method addEvent

qrenderdoc/Windows/APIInspector.cpp:246–280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

244}
245
246void APIInspector::addEvent(const APIEvent &ev, bool primary)
247{
248 if(ev.chunkIndex == APIEvent::NoChunk)
249 return;
250
251 const SDFile &file = m_Ctx.GetStructuredFile();
252
253 RDTreeWidgetItem *root = new RDTreeWidgetItem({QString::number(ev.eventId), QString()});
254
255 SDChunk *chunk = NULL;
256
257 if(ev.chunkIndex < file.chunks.size())
258 {
259 chunk = file.chunks[ev.chunkIndex];
260
261 m_Chunks.push_back(chunk);
262
263 root->setText(1, SDObject2Variant(chunk, true));
264
265 addStructuredChildren(root, *chunk);
266 }
267 else
268 {
269 root->setText(1, tr("Invalid chunk index %1").arg(ev.chunkIndex));
270 }
271
272 if(primary)
273 root->setBold(true);
274
275 root->setTag(QVariant::fromValue((quintptr)(void *)chunk));
276
277 ui->apiEvents->addTopLevelItem(root);
278
279 ui->apiEvents->setSelectedItem(root);
280}

Callers

nothing calls this directly

Calls 14

SDObject2VariantFunction · 0.85
addStructuredChildrenFunction · 0.85
fromValueFunction · 0.85
setTagMethod · 0.80
addTopLevelItemMethod · 0.80
setSelectedItemMethod · 0.80
QStringFunction · 0.50
trFunction · 0.50
GetStructuredFileMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected