1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- .TH "JsonHelper" 3 "Tue Aug 9 2022" "openPilotLog" \" -*- nroff -*-
- .ad l
- .nh
- .SH NAME
- JsonHelper \- The \fBJsonHelper\fP class is responsible for parsing the database (sqlite) to and from JSON\&.
- .SH SYNOPSIS
- .br
- .PP
- .PP
- \fC#include <jsonhelper\&.h>\fP
- .SS "Public Member Functions"
- .in +1c
- .ti -1c
- .RI "\fBJsonHelper\fP (QFileInfo database_file)"
- .br
- .in -1c
- .SS "Static Public Member Functions"
- .in +1c
- .ti -1c
- .RI "static void \fBexportDatabase\fP ()"
- .br
- .RI "exportDatabase exports the currently active database to JSON\&. "
- .ti -1c
- .RI "static void \fBimportDatabase\fP ()"
- .br
- .RI "importDatabase imports a dataset from JSON\&. Files need to be at AStanardPaths::JSON for now\&. "
- .ti -1c
- .RI "static QJsonDocument \fBreadFileToDoc\fP (const QString &file_path)"
- .br
- .RI "readToDocument reads data from a JSON file into a QJSonDocument "
- .ti -1c
- .RI "static void \fBwriteDocToFile\fP (const QJsonDocument &doc, const QString &file_name)"
- .br
- .RI "writes a QJsonDocument to a file "
- .in -1c
- .SH "Detailed Description"
- .PP
- The \fBJsonHelper\fP class is responsible for parsing the database (sqlite) to and from JSON\&.
- .SH "Member Function Documentation"
- .PP
- .SS "void JsonHelper::exportDatabase ()\fC [static]\fP"
- .PP
- exportDatabase exports the currently active database to JSON\&. QJsonObject can be constructed from QHash<QString, QVariant> aka QVariantmap\&. All rows are put into a QJsonArray and the Array is embedded into a QJsonDocument, which can be exported\&. The files are created at Paths::Export\&.
- .SS "QJsonDocument JsonHelper::readFileToDoc (const QString & file_path)\fC [static]\fP"
- .PP
- readToDocument reads data from a JSON file into a QJSonDocument
- .PP
- \fBParameters\fP
- .RS 4
- \fIfile_path\fP
- .RE
- .PP
- .SH "Author"
- .PP
- Generated automatically by Doxygen for openPilotLog from the source code\&.
|