A class used to create formatted reports based on ProgressStats item attribute values.
More...
|
|
| GmRunProgressReport (GmResultsData *resultsData, QString fileName, const GmLogCategory &logger) |
| | Report constructor.
|
| |
|
| ~GmRunProgressReport () |
| | Destructor. Closes the report file.
|
| |
|
QString | fileName () const |
| | Returns the output file name for this report.
|
| |
|
void | setTitle (QString title) |
| | Adjusts the report title.
|
| |
|
void | addItemDescription (QString description) |
| | Adds an item description to the report.
|
| |
| int | addColumn (int itemId, int attrId, QString colTitle="", bool autoTimeUnit=false, int width=-1, ColAlignment align=GM_RUNPROG_REPORT_AUTO, int attrDim=-1) |
| | Adds to the report a new column whose values can be directly obtained from the given LOCAL attribute belonging to the item provided on the call to saveReportLine(). MUST be called before any call to saveReportLine()
|
| |
| int | addColumn (QString colTitle, QString colUnit, QString fmt="", bool autoTimeUnit=false, int width=-1, ColAlignment align=GM_RUNPROG_REPORT_RIGHT) |
| | Adds to the report a new column whose values cshould be provided manually. MUST be called before the call to saveReportLine()
|
| |
|
void | setColumnValueFunction (int col, const ValueFunctionT &f) |
| | Sets the save function associated with this column.
|
| |
|
void | setColumnIgnoreOnZero (int col) |
| | Tells the report that a column with a zero value should be printed as an empty column.
|
| |
|
void | setColumnValue (int col, int val) |
| | Manually set the column value.
|
| |
|
void | setColumnValue (int col, double val) |
| | Manually set the column value.
|
| |
|
void | setColumnValue (int col, const double *val, int size) |
| | Manually set the column value. When setting values for a known attribute with a dim filter, v should point to the WHOLE vector.
|
| |
|
void | setColumnValue (int col, QString str) |
| | Manually set the column value.
|
| |
|
void | saveReportLine (int itemId, void *itemUserData) |
| | Saves a new line to the report, filled with the current values. Columns tied to an attribute will have their values updated automatically.
|
| |
|
void | saveTrailler (QString traillerStr) |
| | Adds the report closing trailler data.
|
| |
|
|
| Q_DISABLE_COPY (GmRunProgressReport) |
| |
|
void | saveReportHeader () |
| | Starts the report saving. Should be called ONCE, AFTER all calls to addColumn().
|
| |
|
void | saveFormattedHeader (bool title) |
| | Saves the header, possibly including the report title for a formatted report.
|
| |
|
void | saveFormattedLine () |
| | Saves a new report line with the data stored on the columns for a formatted report.
|
| |
|
void | saveFormattedTrailler (QString traillerStr) |
| | Saves the report closing trailler data for a formatted report.
|
| |
|
void | saveCsvHeader (bool title) |
| | Saves the header, possibly including the report title for a CSV report.
|
| |
|
void | saveCsvLine () |
| | Saves a new report line with the data stored on the columns for a Csv report.
|
| |
|
void | saveCsvTrailler (QString traillerStr) |
| | Saves the report closing trailler data for a Csv report.
|
| |
|
QStringList | prepareTitle (QString title, QString unit) const |
| | Prepares a title value splitting the given value on new lines and adding the unit if available.
|
| |
|
QStringList | splitMultilineStr (QString title, bool trim) const |
| | Splits the given value on
characters, returning a string list. Each list entry is trimmed.
|
| |
|
int | findColumnWidth (const ColData &colData, int dataSize) const |
| | Calculates a best guess for a column width based on the column definition metadata and on the data size (number of dimensions)
|
| |
|
QString | alignStr (QString str, int width, ColAlignment align) const |
| | Returns the given string suitably aligned into a space of width characters.
|
| |
A class used to create formatted reports based on ProgressStats item attribute values.