12#ifndef STAT_TABLE_EXPORTER_H
13#define STAT_TABLE_EXPORTER_H
22#include <QCoreApplication>
47 QList<QList<QVariant>>
rows;
64 static QString
plainCell(
const QVariant &var,
int width = 0);
Serialises a statistics table to plain text, CSV, XML and YAML and saves it to a file.
Definition stat_table_exporter.h:36
static void saveAs(QWidget *parent, std::function< QByteArray(st_format_type)> serialize)
Asks for a file name and format, serialises and writes the file.
Definition stat_table_exporter.cpp:211
static QByteArray toByteArray(st_format_type format, const Table &table)
Serialises a table in the given format.
Definition stat_table_exporter.cpp:58
static QString plainCell(const QVariant &var, int width=0)
Converts a QVariant cell value to a plain-text string.
Definition stat_table_exporter.cpp:29
enum _st_format_type st_format_type
Output format used when saving statistics tree data via "Save As...".
A statistics table: title, headers and one list of cell values per row.
Definition stat_table_exporter.h:43
QStringList headers
Column header texts.
Definition stat_table_exporter.h:46
QList< QList< QVariant > > rows
Cell values per row; empty rows are skipped on export.
Definition stat_table_exporter.h:47
QString title
Table title, usually the window subtitle.
Definition stat_table_exporter.h:44
QString file_name
Display name of the capture file.
Definition stat_table_exporter.h:45