Add object variable currentTicketType

This commit is contained in:
Siegfried Siegert 2024-03-08 13:04:28 +01:00
parent d5786aa5ab
commit 8659627171
Signed by: SiegfriedSiegert
GPG Key ID: 68371E015E8F0B03
2 changed files with 8 additions and 0 deletions

View File

@ -67,7 +67,11 @@ ATBDeviceControllerPlugin::ATBDeviceControllerPlugin(QObject *parent)
this->diag = new DeviceControllerDiag(this->persistentData, this); this->diag = new DeviceControllerDiag(this->persistentData, this);
connect(this->diag, &DeviceControllerDiag::newVoltage, this, &ATBDeviceControllerPlugin::onNewVoltage); connect(this->diag, &DeviceControllerDiag::newVoltage, this, &ATBDeviceControllerPlugin::onNewVoltage);
// currentSelectedTicketType - number of used "Kombiticket" (deprecated) use TICKET_VARIANT in future
this->currentSelectedTicketType = 0; this->currentSelectedTicketType = 0;
this->currentTicketVariant = TICKET_VARIANT::PARKING_TICKET;
this->currentCashState = CASH_STATE::CACHE_EMPTY; this->currentCashState = CASH_STATE::CACHE_EMPTY;
this->cashStartAmountInt = 0; this->cashStartAmountInt = 0;
@ -606,6 +610,8 @@ void ATBDeviceControllerPlugin::requestPrintTicket(nsDeviceControllerInterface::
this->templateList.clear(); this->templateList.clear();
this->currentTicketVariant = ticketVariant;
switch (ticketVariant) { switch (ticketVariant) {
case nsDeviceControllerInterface::TICKET_VARIANT::START_RECEIPT: case nsDeviceControllerInterface::TICKET_VARIANT::START_RECEIPT:
qCritical() << " -> TICKET_VARIANT::START_RECEIPT"; qCritical() << " -> TICKET_VARIANT::START_RECEIPT";

View File

@ -131,6 +131,8 @@ private:
// dbus // dbus
int init_sc_dbus(); int init_sc_dbus();
// printer privates
TICKET_VARIANT currentTicketVariant;
QLocale printerLocale; QLocale printerLocale;
private slots: private slots: