TicketPrint: use interface method 'prn_printKombiticket()'

... instead of printing templates.
This commit is contained in:
Siegfried Siegert 2023-06-09 11:18:39 +02:00
parent 3722dd4d28
commit c330be4f30
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 13 additions and 4 deletions

View File

@ -29,6 +29,8 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent) : QObject(
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByEscrow()), this, SLOT(onCashPayStopByEscrow()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByError()), this, SLOT(onCashPayStopByError()));
connect(dynamic_cast<QObject*>(hw), SIGNAL(hwapi_payStopByTimeout()), this, SLOT(onCashPayStopByTimeout()));
this->currentSelectedTicketType = 0;
}
ATBDeviceControllerPlugin::~ATBDeviceControllerPlugin() {}
@ -154,8 +156,6 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHash<QString, QVariant
}
// TODO: wird hier nur 'licensePlate' gedruckt?
if (!this->hw->prn_sendDynamicPrnValues(dynTicketData->licensePlate)) {
this->errorCode = "hwapi::prn_sendDynamicPrnValues";
@ -181,8 +181,15 @@ void ATBDeviceControllerPlugin::requestPrintTicket(const QHash<QString, QVariant
void ATBDeviceControllerPlugin::onPrinterDataPrepared()
{
this->currentTemplate = 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();
}

View File

@ -116,6 +116,8 @@ private:
bool private_loadCashAgentLib(QString pluginName);
quint8 currentSelectedTicketType;
private slots:
// printer