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

Method exportHTMLTable

qrenderdoc/Windows/PipelineState/PipelineStateViewer.cpp:543–605  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

541}
542
543void PipelineStateViewer::exportHTMLTable(QXmlStreamWriter &xml, const QStringList &cols,
544 const QList<QVariantList> &rows)
545{
546 xml.writeStartElement(lit("table"));
547
548 {
549 xml.writeStartElement(lit("thead"));
550 xml.writeStartElement(lit("tr"));
551
552 for(const QString &col : cols)
553 {
554 xml.writeStartElement(lit("th"));
555 xml.writeCharacters(col);
556 xml.writeEndElement();
557 }
558
559 xml.writeEndElement();
560 xml.writeEndElement();
561 }
562
563 {
564 xml.writeStartElement(lit("tbody"));
565
566 if(rows.isEmpty())
567 {
568 xml.writeStartElement(lit("tr"));
569
570 for(int i = 0; i < cols.count(); i++)
571 {
572 xml.writeStartElement(lit("td"));
573 xml.writeCharacters(lit("-"));
574 xml.writeEndElement();
575 }
576
577 xml.writeEndElement();
578 }
579 else
580 {
581 for(const QVariantList &row : rows)
582 {
583 xml.writeStartElement(lit("tr"));
584
585 for(const QVariant &el : row)
586 {
587 xml.writeStartElement(lit("td"));
588
589 if(el.type() == QVariant::Bool)
590 xml.writeCharacters(el.toBool() ? tr("True") : tr("False"));
591 else
592 xml.writeCharacters(el.toString());
593
594 xml.writeEndElement();
595 }
596
597 xml.writeEndElement();
598 }
599 }
600

Callers 4

exportHTMLMethod · 0.80
exportHTMLMethod · 0.80
exportHTMLMethod · 0.80
exportHTMLMethod · 0.80

Calls 5

trFunction · 0.50
isEmptyMethod · 0.45
countMethod · 0.45
typeMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected