TXPrinter Class
芯烨打印机 More...
Header: | #include <TXPrinter> |
Inherits: | QObject |
Public Functions
TXPrinter(QObject *parent = 0) | |
~TXPrinter() |
- 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
芯烨打印机
Member Function Documentation
TXPrinter::TXPrinter(QObject *parent = 0)
Default constructs an instance of TXPrinter.
TXPrinter::~TXPrinter()
Destroys the instance of TXPrinter.
[slot]
QVariantMap TXPrinter::connectionParam() const
See also setConnectionParam().
[slot]
int TXPrinter::maxPrintingOneTime() const
返回一次能最多打印的张数
See also setMaxPrintingOneTime().
[slot]
bool TXPrinter::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 TXPrinter::printParam() const
返回打印参数
See also setPrintParam().
[slot]
void TXPrinter::setConnectionParam(const QVariantMap &iConnParam)
See also connectionParam().
[slot]
void TXPrinter::setMaxPrintingOneTime(int iValue)
设置一次最多能打印多少张,默认为100
See also maxPrintingOneTime().
[slot]
void TXPrinter::setPrintParam(const QVariantMap &iPrintParam)
设置打印参数 iPrintParam { "chroma": 30, "zoom": 8, "margin_vertical": 1, "margin_horizontal": 2, "speed": 5, "density" : 7 "gap" : 0 }
See also printParam().
[slot]
void TXPrinter::setTempDir(const QString &iDir)
设置临时目录
See also tempDir().
[slot]
QString TXPrinter::tempDir() const
返回临时目录路径
See also setTempDir().