1 // Implementation of log file formatting helpers
2 // Copyright © 2009 The University of Chicago
6 #include "StringSurrogate.h"
9 #include "StringFunc.h"
11 QString
MakeTableHeader(QString header
){ return "<th> "+ header
+ "</th> " ;}
12 QString
MakeTableHeader(int n
){ return "<th> "+ IntToStringWithCommas(n
) + "</th> " ;}
13 QString
LargeTitle (QString title
) { return "\n <h1>" + title
+ "</h1> \n ";}
14 QString
SmallTitle (QString title
) { return "\n <h2>" + title
+ "</h2> \n ";}
15 QString
SmallerTitle (QString title
) { return "\n <h3>" + title
+ "</h3> \n ";}
16 QString
TableData(QString stuff
) { return "<td>" + stuff
+ "</td>";}
17 QString
TableData(CStringSurrogate stuff
) { return "<td>" + stuff
.Display() + "</td>";}
18 QString
TableData(CParse
& stuff
) { return "<td>" + stuff
.Display() + "</td>";}
19 QString
TableData(CSignature
* pSig
) { return " <td>" + pSig
->Display() + "</td>";}
20 QString
TableData(int value
) { return "<td>" + QString("%1").arg(value
,10) + "</td>";}
21 QString
TableData(double value
) { return "<td>" + QString("%1").arg(value
,10) + "</td>";}
22 QString
TableData() { return "<td>" + QString(" ")+ "</td>";}
24 const QString
StartTable ("\n\n<table border=\"1\"> \n");
25 const QString
EndTable ("\n\n</table> \n");
26 const QString
StartTableRow ("\n<tr>");
27 const QString
EndTableRow ("</tr>");