update printQR method
This commit is contained in:
@@ -862,11 +862,38 @@ void ATBDeviceControllerPlugin::requestPrintReceipt(const QString & printingStri
|
||||
|
||||
|
||||
this->printResultCheckCounter = 0;
|
||||
QTimer::singleShot(2000, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
||||
//QTimer::singleShot(2000, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
||||
|
||||
//QTimer::singleShot(2000, this, [this](){ hw->prn_cut(3); } );
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::requestPrintQR(const QString & printingString)
|
||||
{
|
||||
QByteArray ba_qr = this->codec->fromUnicode(printingString);
|
||||
|
||||
//QByteArray ba = printingString.toUtf8();
|
||||
hw->prn_switchPower(true);
|
||||
hw->prn_sendQRdata(&ba_qr);
|
||||
hw->prn_printQRcode();
|
||||
// DEBUG
|
||||
qCritical() << "---------------------------------------------------------------";
|
||||
qCritical() << "ATBDeviceControllerPlugin::requestPrintQR()";
|
||||
qCritical() << " QR data:";
|
||||
qCritical() << QString(ba_qr);
|
||||
qCritical() << "---------------------------------------------------------------";
|
||||
|
||||
|
||||
this->printResultCheckCounter = 0;
|
||||
//QTimer::singleShot(2000, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
||||
|
||||
//QTimer::singleShot(2000, this, [this](){ hw->prn_cut(3); } );
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::requestPrintCut(const qint16 & printTimer)
|
||||
{
|
||||
QTimer::singleShot(printTimer, this, SLOT(onPrinterWaitForPrintingReceipt()));
|
||||
}
|
||||
|
||||
void ATBDeviceControllerPlugin::onPrinterWaitForPrintingReceipt()
|
||||
{
|
||||
quint8 printerResult = this->hw->prn_getPrintResult();
|
||||
|
||||
Reference in New Issue
Block a user