![]() |
Code Documentation 3.7
Social Network Visualizer
|
Implements TableExport::toCSV() and TableExport::toJSON() (#226). More...
#include "table_export.h"#include <QAbstractItemModel>#include <QFile>#include <QJsonArray>#include <QJsonDocument>#include <QJsonObject>#include <QString>#include <QTextStream>
Namespaces | |
| namespace | TableExport |
| Free functions that serialise any QAbstractItemModel to CSV or JSON. | |
Functions | |
| QString | TableExport::csvQuote (const QString &value) |
Returns a CSV-safe quoted field: wraps value in double-quotes if it contains a comma, double-quote, or newline; embedded double-quotes are escaped as "". | |
| bool | TableExport::toCSV (QAbstractItemModel *model, const QString &filePath) |
Writes model to an RFC 4180 CSV file at filePath. | |
| bool | TableExport::toJSON (QAbstractItemModel *model, const QString &filePath) |
Writes model to a JSON file at filePath. | |
Implements TableExport::toCSV() and TableExport::toJSON() (#226).