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

Method fillAPIView

qrenderdoc/Windows/APIInspector.cpp:209–244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

207}
208
209void APIInspector::fillAPIView()
210{
211 ui->apiEvents->setUpdatesEnabled(false);
212 ui->apiEvents->clear();
213
214 m_Chunks.clear();
215
216 const ActionDescription *action = m_Ctx.CurSelectedAction();
217
218 if(action != NULL && !action->events.isEmpty())
219 {
220 if(action->IsFakeMarker())
221 {
222 RDTreeWidgetItem *root = new RDTreeWidgetItem({lit("---"), QString(action->customName)});
223 root->setBold(true);
224 ui->apiEvents->addTopLevelItem(root);
225 ui->apiEvents->setSelectedItem(root);
226 }
227 else
228 {
229 for(const APIEvent &ev : action->events)
230 {
231 addEvent(ev, ev.eventId == action->eventId);
232 }
233 }
234 }
235 else
236 {
237 APIEvent ev = m_Ctx.GetEventBrowser()->GetAPIEventForEID(m_Ctx.CurSelectedEvent());
238
239 if(ev.eventId > 0)
240 addEvent(ev, true);
241 }
242
243 ui->apiEvents->setUpdatesEnabled(true);
244}
245
246void APIInspector::addEvent(const APIEvent &ev, bool primary)
247{

Callers

nothing calls this directly

Calls 10

addTopLevelItemMethod · 0.80
setSelectedItemMethod · 0.80
GetAPIEventForEIDMethod · 0.80
QStringFunction · 0.50
clearMethod · 0.45
CurSelectedActionMethod · 0.45
isEmptyMethod · 0.45
setBoldMethod · 0.45
GetEventBrowserMethod · 0.45
CurSelectedEventMethod · 0.45

Tested by

no test coverage detected