WebpagePrinterTool 2.0
Print a web page skip the browser's print preview
|
#include "ModelsJson.h"
#include "../excep/JsonParseError.h"
#include <QJsonDocument>
#include <QJsonObject>
#include <qjsonobject.h>
函数 | |
QJsonObject | toPrintedPageJson (const PrintedPage &page) |
PrintedPage | fromPrintedPageJson (const QString &json) |
Converts a JSON string into a PrintedPage object. | |
PrintedPage | fromPrintedPageJson (const QString &source_json, const QJsonObject &obj) |
converts a JSON object to a PrintedPage object. | |
QJsonObject | toPrinterConfigJson (const PrinterConfig &config) |
PrinterConfig | fromPrinterConfigJson (const QString &json) |
Converts a JSON string to a PrinterConfig object. | |
PrinterConfig | fromPrinterConfigJson (const QString &source_json, const QJsonObject &obj) |
Converts a JSON object to a PrinterConfig object. | |
PrintedPage fromPrintedPageJson | ( | const QString & | json | ) |
Converts a JSON string into a PrintedPage object.
json | The JSON string representing the PrintedPage data. |
PrintedPage fromPrintedPageJson | ( | const QString & | json, |
const QJsonObject & | obj ) |
converts a JSON object to a PrintedPage object.
json | source json |
obj | object |
从JSON字符串和QJsonObject对象构造PrintedPage对象。
该函数用于将JSON格式的数据转换为PrintedPage对象。通常用于从网络或文件中读取JSON数据后, 将其转换为程序内部可操作的对象。
json | 包含PrintedPage数据的JSON字符串。 |
obj | 包含PrintedPage数据的QJsonObject对象。 |
PrinterConfig fromPrinterConfigJson | ( | const QString & | json | ) |
Converts a JSON string to a PrinterConfig object.
json | The JSON string to be converted. |
PrinterConfig fromPrinterConfigJson | ( | const QString & | source_json, |
const QJsonObject & | obj ) |
QJsonObject toPrintedPageJson | ( | const PrintedPage & | page | ) |
Converts a PrintedPage object to its JSON representation.
page | The PrintedPage object to convert |
QJsonObject toPrinterConfigJson | ( | const PrinterConfig & | config | ) |
Converts a PrinterConfig object to its JSON string representation.
config | The PrinterConfig object to convert. |