WebpagePrinterTool 2.0
Print a web page skip the browser's print preview
载入中...
搜索中...
未找到
ModelsJson.h 文件参考
#include "PrintedPage.h"
#include "PrinterConfig.h"
#include <qjsonobject.h>
ModelsJson.h 的引用(Include)关系图:
此图展示该文件被哪些文件直接或间接地引用了:

浏览该文件的源代码.

函数

QJsonObject toPrintedPageJson (const PrintedPage &page)
 
PrintedPage fromPrintedPageJson (const QString &json)
 Converts a JSON string into a PrintedPage object.
 
PrintedPage fromPrintedPageJson (const QString &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.
 

函数说明

◆ fromPrintedPageJson() [1/2]

PrintedPage fromPrintedPageJson ( const QString & json)

Converts a JSON string into a PrintedPage object.

参数
jsonThe JSON string representing the PrintedPage data.
返回
The deserialized PrintedPage object.

◆ fromPrintedPageJson() [2/2]

PrintedPage fromPrintedPageJson ( const QString & json,
const QJsonObject & obj )

converts a JSON object to a PrintedPage object.

参数
jsonsource json
objobject
返回
PrintedPage

从JSON字符串和QJsonObject对象构造PrintedPage对象。

该函数用于将JSON格式的数据转换为PrintedPage对象。通常用于从网络或文件中读取JSON数据后, 将其转换为程序内部可操作的对象。

参数
json包含PrintedPage数据的JSON字符串。
obj包含PrintedPage数据的QJsonObject对象。
返回
PrintedPage 转换后的PrintedPage对象。

◆ fromPrinterConfigJson() [1/2]

PrinterConfig fromPrinterConfigJson ( const QString & json)

Converts a JSON string to a PrinterConfig object.

参数
jsonThe JSON string to be converted.
返回
PrinterConfig The resulting PrinterConfig object.

◆ fromPrinterConfigJson() [2/2]

PrinterConfig fromPrinterConfigJson ( const QString & source_json,
const QJsonObject & obj )

Converts a JSON object to a PrinterConfig object.

参数
source_json
objobj
返回
PrinterConfig

◆ toPrintedPageJson()

QJsonObject toPrintedPageJson ( const PrintedPage & page)

Converts a PrintedPage object to its JSON representation.

参数
pageThe PrintedPage object to convert
返回
Json Object

◆ toPrinterConfigJson()

QJsonObject toPrinterConfigJson ( const PrinterConfig & config)

Converts a PrinterConfig object to its JSON string representation.

参数
configThe PrinterConfig object to convert.
返回
Json Object