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

Method ExportAction

qrenderdoc/Windows/EventBrowser.cpp:5498–5534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5496}
5497
5498void EventBrowser::ExportAction(QTextStream &writer, int maxNameLength, int indent, bool firstchild,
5499 const QModelIndex &idx)
5500{
5501 QString nameString = GetExportString(indent, firstchild, idx);
5502
5503 QModelIndex eidIdx = idx.model()->sibling(idx.row(), COL_EID, idx);
5504 QModelIndex actionIdx = idx.model()->sibling(idx.row(), COL_ACTION, idx);
5505
5506 QString line = QFormatStr("%1 | %2 | %3")
5507 .arg(eidIdx.data(ROLE_SELECTED_EID).toString(), -5)
5508 .arg(nameString, -maxNameLength)
5509 .arg(actionIdx.data(Qt::DisplayRole).toString(), -6);
5510
5511 if(m_Model->HasTimes())
5512 {
5513 QVariant duration = idx.model()->sibling(idx.row(), COL_DURATION, idx).data(Qt::DisplayRole);
5514
5515 if(duration != QVariant())
5516 {
5517 line += QFormatStr(" | %1").arg(duration.toString());
5518 }
5519 else
5520 {
5521 line += lit(" |");
5522 }
5523 }
5524
5525 writer << line << "\n";
5526
5527 firstchild = true;
5528
5529 for(int i = 0, rowCount = idx.model()->rowCount(idx); i < rowCount; i++)
5530 {
5531 ExportAction(writer, maxNameLength, indent + 1, firstchild, idx.child(i, COL_NAME));
5532 firstchild = false;
5533 }
5534}
5535
5536QVariant EventBrowser::persistData()
5537{

Callers

nothing calls this directly

Calls 10

siblingMethod · 0.80
HasTimesMethod · 0.80
QVariantClass · 0.50
modelMethod · 0.45
rowMethod · 0.45
argMethod · 0.45
toStringMethod · 0.45
dataMethod · 0.45
rowCountMethod · 0.45
childMethod · 0.45

Tested by

no test coverage detected