TZplPrinterV3 Class
斑马打印机的Qt封装 More...
Header: | #include <TZplPrinterV3> |
Inherits: | QObject |
Public Functions
TZplPrinterV3(QObject *iParent = nullptr) | |
~TZplPrinterV3() |
- 31 public functions inherited from QObject
Public Slots
QVariantMap | connectionParam() const |
QString | getCmdStr(const QVariantMap &iData, TError *oErr = nullptr) |
int | maxPrintingOneTime() const |
bool | print(const QVariantMap &iData, TError *oErr = nullptr) |
bool | printByCommand(const QString &iCmdStr, TError *oErr = nullptr) |
bool | printByList(const QVariantList &iData, TError *oErr = nullptr) |
QVariantMap | printParam() const |
void | setConnectionParam(const QVariantMap &iConnParam) |
void | setMaxPrintingOneTime(int iValue) |
void | setPrintParam(const QVariantMap &iPrintParam) |
void | setTempDir(const QString &iDir) |
QString | tempDir() const |
- 1 public slot inherited from QObject
Additional Inherited Members
- 1 property inherited from QObject
- 2 signals inherited from QObject
- 1 public variable inherited from QObject
- 10 static public members inherited from QObject
- 9 protected functions inherited from QObject
- 2 protected variables inherited from QObject
Detailed Description
斑马打印机的Qt封装
Member Function Documentation
TZplPrinterV3::TZplPrinterV3(QObject *iParent = nullptr)
Default constructs an instance of TZplPrinterV3.
TZplPrinterV3::~TZplPrinterV3()
Destroys the instance of TZplPrinterV3.
[slot]
QVariantMap TZplPrinterV3::connectionParam() const
返回连接参数
See also setConnectionParam().
[slot]
QString TZplPrinterV3::getCmdStr(const QVariantMap &iData, TError *oErr = nullptr)
[slot]
int TZplPrinterV3::maxPrintingOneTime() const
返回一次能最多打印的张数
See also setMaxPrintingOneTime().
[slot]
bool TZplPrinterV3::print(const QVariantMap &iData, TError *oErr = nullptr)
打印标签(同一个标签*count) iData { "count": 1, "width": 80, "height": 40, "info": [ { "type": "BAR_CODE" | "QR_CODE" | "PICTURE", "x" : "", "y" : "", "width": "", "height": "", "value": "" }, { "type": "TEXT", "x" : "", "y" : "", "font_size": "", "value": "" }, { "type": "LINE", "x1": "", "y1": "", "x2": "", "y2": "", "weight": "" } ] }
[slot]
bool TZplPrinterV3::printByCommand(const QString &iCmdStr, TError *oErr = nullptr)
[slot]
bool TZplPrinterV3::printByList(const QVariantList &iData, TError *oErr = nullptr)
打印多个不同标签(标签A*count,标签B*count...),(若单个标签异常,会被跳过) iData [ { "count": 1, "width": 80, "height": 40, "info": [ { "type": "BAR_CODE" | "QR_CODE" | "PICTURE", "x" : "", "y" : "", "width": "", "height": "", "value": "" }, { "type": "TEXT", "x" : "", "y" : "", "font_size": "", "value": "" }, { "type": "LINE", "x1": "", "y1": "", "x2": "", "y2": "", "weight": "" } ] } ]
[slot]
QVariantMap TZplPrinterV3::printParam() const
返回打印参数
See also setPrintParam().
[slot]
void TZplPrinterV3::setConnectionParam(const QVariantMap &iConnParam)
设置连接参数 iConnParam { "host": "192.168.1.114", "port": 6101, "connection_type": "TCP", "printer_type": "ZT140" } { "lpt": "LPT1", "connection_type": "LPT", "printer_type": "GT800" }
See also connectionParam().
[slot]
void TZplPrinterV3::setMaxPrintingOneTime(int iValue)
设置一次最多能打印多少张,默认为10
See also maxPrintingOneTime().
[slot]
void TZplPrinterV3::setPrintParam(const QVariantMap &iPrintParam)
设置打印参数 iPrintParam { "chroma": 30, "zoom": 8, "margin_vertical": 1, "margin_horizontal": 2 }
See also printParam().
[slot]
void TZplPrinterV3::setTempDir(const QString &iDir)
设置临时目录
See also tempDir().
[slot]
QString TZplPrinterV3::tempDir() const
返回临时目录路径
See also setTempDir().