Serialises a statistics table to plain text, CSV, XML and YAML and saves it to a file.
More...
#include <stat_table_exporter.h>
|
| struct | Table |
| | A statistics table: title, headers and one list of cell values per row. More...
|
|
| static QByteArray | toByteArray (st_format_type format, const Table &table) |
| | Serialises a table in the given format.
|
| static QString | plainCell (const QVariant &var, int width=0) |
| | Converts a QVariant cell value to a plain-text string.
|
| static void | saveAs (QWidget *parent, std::function< QByteArray(st_format_type)> serialize) |
| | Asks for a file name and format, serialises and writes the file.
|
Serialises a statistics table to plain text, CSV, XML and YAML and saves it to a file.
Shared by TapParameterDialog and the Distribution dialog so both produce identical output.
◆ plainCell()
| QString StatTableExporter::plainCell |
( |
const QVariant & | var, |
|
|
int | width = 0 ) |
|
static |
Converts a QVariant cell value to a plain-text string.
- Parameters
-
| var | The QVariant value to convert. |
| width | Minimum field width for padding; 0 for no padding. |
- Returns
- Plain-text representation of
var.
◆ saveAs()
| void StatTableExporter::saveAs |
( |
QWidget * | parent, |
|
|
std::function< QByteArray(st_format_type)> | serialize ) |
|
static |
Asks for a file name and format, serialises and writes the file.
- Parameters
-
| parent | Parent widget of the file dialog and the error box. |
| serialize | Called with the chosen format to produce the file contents. |
◆ toByteArray()
Serialises a table in the given format.
- Parameters
-
| format | Target format (plain text, CSV, XML or YAML). |
| table | The table to serialise. |
- Returns
- The serialised table.
The documentation for this class was generated from the following files:
- /builds/wireshark/wireshark/ui/qt/utils/stat_table_exporter.h
- /builds/wireshark/wireshark/ui/qt/utils/stat_table_exporter.cpp