Quantum Phenomena Explorer 7.9.8
Interactive quantum-phenomena Explorer Tutor — source documentation
Loading...
Searching...
No Matches
qpe::ExperimentDocument2DJson Class Reference

Implements the Experiment Document2D Json component. More...

#include <experimentdocument2d.h>

Static Public Member Functions

static QString formatId ()
 Performs format id.
 
static QJsonObject toJson (const ExperimentDocument2D &document)
 Performs to json.
 
static bool fromJson (const QJsonObject &json, ExperimentDocument2D &document, QString &errorMessage)
 Performs from json.
 
static bool saveFile (const QString &fileName, const ExperimentDocument2D &document, QString &errorMessage)
 Saves file.
 
static bool loadFile (const QString &fileName, ExperimentDocument2D &document, QString &errorMessage)
 Loads file.
 

Detailed Description

Implements the Experiment Document2D Json component.

The class provides one focused service within the QPE architecture and is documented here independently of the experiment-level Help.

Definition at line 151 of file experimentdocument2d.h.

Member Function Documentation

◆ formatId()

QString qpe::ExperimentDocument2DJson::formatId ( )
static

Performs format id.

Definition at line 1892 of file experimentdocument2d.cpp.

Referenced by fromJson(), and toJson().

◆ fromJson()

bool qpe::ExperimentDocument2DJson::fromJson ( const QJsonObject & json,
ExperimentDocument2D & document,
QString & errorMessage )
static

Performs from json.

Parameters
jsonThe json value used by the operation.
documentThe document value used by the operation.
errorMessageThe error message value used by the operation.

Definition at line 1990 of file experimentdocument2d.cpp.

References qpe::ExperimentDocument2D::controls, qpe::ExperimentDocument2D::CurrentSchemaVersion, formatId(), qpe::ExperimentDocument2D::name, qpe::ExperimentDocument2D::schemaVersion, and qpe::ExperimentDocument2D::sourcePreset.

Referenced by loadFile(), and qpe::tests::runExperimentDocument2DTests().

◆ loadFile()

bool qpe::ExperimentDocument2DJson::loadFile ( const QString & fileName,
ExperimentDocument2D & document,
QString & errorMessage )
static

Loads file.

Parameters
fileNameFilesystem name/path.
documentThe document value used by the operation.
errorMessageThe error message value used by the operation.

Definition at line 2164 of file experimentdocument2d.cpp.

References fromJson().

Referenced by MainWindow::loadExperimentJson(), and qpe::tests::runExperimentDocument2DTests().

◆ saveFile()

bool qpe::ExperimentDocument2DJson::saveFile ( const QString & fileName,
const ExperimentDocument2D & document,
QString & errorMessage )
static

Saves file.

Parameters
fileNameFilesystem name/path.
documentThe document value used by the operation.
errorMessageThe error message value used by the operation.

Definition at line 2133 of file experimentdocument2d.cpp.

References toJson().

Referenced by qpe::tests::runExperimentDocument2DTests(), and MainWindow::saveExperimentJson().

◆ toJson()

QJsonObject qpe::ExperimentDocument2DJson::toJson ( const ExperimentDocument2D & document)
static

Performs to json.

Parameters
documentThe document value used by the operation.

Definition at line 1897 of file experimentdocument2d.cpp.

References qpe::ExperimentDocument2D::controls, formatId(), qpe::ExperimentDocument2D::name, qpe::ExperimentDocument2D::schemaVersion, and qpe::ExperimentDocument2D::sourcePreset.

Referenced by qpe::tests::runExperimentDocument2DTests(), and saveFile().


The documentation for this class was generated from the following files: