JsonFilter

Manages the import/export of data from/to a file formatted using JSON.

Public Types

  • enum DataContainerType

Public Methods

void

JsonFilter()

bool

NaNValueToZeroEnabled() const

QVector< AbstractColumn::ColumnMode >

columnModes()

QJsonValue::Type

dataRowType() const

QStringList

dataRowTypes()

QStringList

dataTypes()

QString

dateTimeFormat() const

int

endColumn() const

int

endRow() const

QString

fileInfoString(const QString &)

bool

load(XmlStreamReader *) override

QVector< int >

modelRows() const

QLocale::Language

numberFormat() const

QVector< QStringList >

preview(const QString &fileName, int lines)

QVector< QStringList >

preview(QIODevice &device, int lines)

void

readDataFromDevice(QIODevice &device, AbstractDataSource *, ImportMode=ImportMode::Replace, int lines=-1)

void

readDataFromFile(const QString &fileName, AbstractDataSource *=nullptr, ImportMode=ImportMode::Replace) override

void

save(QXmlStreamWriter *) const override

void

setCreateIndexEnabled(const bool)

void

setDataRowType(const QJsonValue::Type)

void

setDateTimeFormat(const QString &)

void

setEndColumn(const int)

void

setEndRow(const int)

void

setImportObjectNames(const bool)

void

setModel(QJsonModel *)

void

setModelRows(const QVector< int > &)

void

setNaNValueToZero(const bool)

void

setNumberFormat(QLocale::Language)

void

setStartColumn(const int)

void

setStartRow(const int)

int

startColumn() const

int

startRow() const

QStringList

vectorNames() const

void

write(const QString &fileName, AbstractDataSource *) override

Detailed Description

class JsonFilter : public AbstractFileFilter

Manages the import/export of data from/to a file formatted using JSON.

Public Functions

void readDataFromDevice(QIODevice &device, AbstractDataSource*, ImportMode = ImportMode::Replace, int lines = -1)

reads the content of the device device.

virtual void readDataFromFile(const QString &fileName, AbstractDataSource* = nullptr, ImportMode = ImportMode::Replace) override

reads the content of the file fileName.

virtual void write(const QString &fileName, AbstractDataSource*) override

writes the content of the data source dataSource to the file fileName.

virtual void save(QXmlStreamWriter*) const override

Saves as XML.

virtual bool load(XmlStreamReader*) override

Loads from XML.

Public Static Functions

static QStringList dataTypes()

returns the list of all predefined data types.

static QStringList dataRowTypes()

returns the list of all predefined data row types.