From c330be4f307c2f62cc9ac4c08d7418a43424883c Mon Sep 17 00:00:00 2001 From: Siegfried Siegert Date: Fri, 9 Jun 2023 11:18:39 +0200 Subject: [PATCH] TicketPrint: use interface method 'prn_printKombiticket()' ... instead of printing templates. --- src/ATBAPP/ATBDeviceControllerPlugin.cpp | 15 +++++++++++---- src/ATBAPP/ATBDeviceControllerPlugin.h | 2 ++ 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.cpp b/src/ATBAPP/ATBDeviceControllerPlugin.cpp index 7f7e733..4219002 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.cpp +++ b/src/ATBAPP/ATBDeviceControllerPlugin.cpp @@ -29,6 +29,8 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject( connect(dynamic_cast(hw), SIGNAL(hwapi_payStopByEscrow()), this, SLOT(onCashPayStopByEscrow())); connect(dynamic_cast(hw), SIGNAL(hwapi_payStopByError()), this, SLOT(onCashPayStopByError())); connect(dynamic_cast(hw), SIGNAL(hwapi_payStopByTimeout()), this, SLOT(onCashPayStopByTimeout())); + + this->currentSelectedTicketType = 0; } ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {} @@ -154,8 +156,6 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHashhw->prn_sendDynamicPrnValues(dynTicketData->licensePlate)) { this->errorCode = "hwapi::prn_sendDynamicPrnValues"; @@ -181,8 +181,15 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHashcurrentTemplate = 1; - this->onPrinterPrintNextTemplate(); + this->hw->prn_printKombiticket(this->currentSelectedTicketType); + + // FAKE SIGNAL: + QTimer::singleShot(2000, this, SLOT(onPrintFinishedOK())); + + + // old: use printer templates: + // this->currentTemplate = 1; + // this->onPrinterPrintNextTemplate(); } diff --git a/src/ATBAPP/ATBDeviceControllerPlugin.h b/src/ATBAPP/ATBDeviceControllerPlugin.h index 2278375..cc7eb83 100644 --- a/src/ATBAPP/ATBDeviceControllerPlugin.h +++ b/src/ATBAPP/ATBDeviceControllerPlugin.h @@ -116,6 +116,8 @@ private: bool private_loadCashAgentLib(QString pluginName); + quint8 currentSelectedTicketType; + private slots: // printer