TTscPrinter Class

TSC类型的打印机 More...

Header: #include <TTscPrinter>
Inherits: QObject

Public Functions

TTscPrinter(QObject *parent = 0)
~TTscPrinter()
  • 31 public functions inherited from QObject

Public Slots

QVariantMap connectionParam() const
int maxPrintingOneTime() const
bool print(const QVariantMap &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

TSC类型的打印机

Member Function Documentation

TTscPrinter::TTscPrinter(QObject *parent = 0)

Default constructs an instance of TTscPrinter.

TTscPrinter::~TTscPrinter()

Destroys the instance of TTscPrinter.

[slot] QVariantMap TTscPrinter::connectionParam() const

返回连接参数

See also setConnectionParam().

[slot] int TTscPrinter::maxPrintingOneTime() const

返回一次能最多打印的张数

See also setMaxPrintingOneTime().

[slot] bool TTscPrinter::print(const QVariantMap &iData, TError *oErr = nullptr)

打印标签 iData { "count": 1, "width": 80, "height": 40, "info": [ { "type": "BAR_CODE", "x" : "", "y" : "", "width": "", "height": "", "value": "", "bar_width" :"", //Bar的宽度(1-5)默认:2 "contain_text":"" //是否在条码下方显示文字0:不显示,1:显示 }, { "type": "QR_CODE" | "PICTURE", "x" : "", "y" : "", "width": "", "height": "", "value": "" }, { "type": "TEXT", "x" : "", "y" : "", "font_size": "", "value": "" }, { "type": "LINE", "x1": "", "y1": "", "x2": "", "y2": "", "weight": "" } ] }

[slot] QVariantMap TTscPrinter::printParam() const

返回打印参数

See also setPrintParam().

[slot] void TTscPrinter::setConnectionParam(const QVariantMap &iConnParam)

设置连接参数(参数内容为本机安装驱动时,在本地电脑生成的打印机的名称) iConnParam { "printer_name": "TSC TTP-244 Pro" }

See also connectionParam().

[slot] void TTscPrinter::setMaxPrintingOneTime(int iValue)

设置一次最多能打印多少张,默认为100

See also maxPrintingOneTime().

[slot] void TTscPrinter::setPrintParam(const QVariantMap &iPrintParam)

设置打印参数 iPrintParam { "chroma": 30, "zoom": 8, "speed": 6, "margin_vertical": 1, "margin_horizontal": 2 }

See also printParam().

[slot] void TTscPrinter::setTempDir(const QString &iDir)

设置临时目录

See also tempDir().

[slot] QString TTscPrinter::tempDir() const

返回临时目录路径

See also setTempDir().