#ifndef ATBAPP_H #define ATBAPP_H #include #include enum class PROGRAM_MODE : quint8 { IDLE = 1, SELL_ENABLE = 2, SELL = 3, SERVICE = 4, OOO = 5 }; QDebug operator<<(QDebug debug, PROGRAM_MODE mode); namespace CC_VARIANT { enum class TERMINAL : quint8 { NO_TERMINAL, INGENICO_CCTOPP, INGENICO_CHIP_AND_PIN, CCV, FEIG_CCTOPP, FEIG_CHIP_AND_PIN }; } namespace PAYMENT_VARIANTS { enum class CASH_VARIANT : quint8 { NO_CASH, CoinsOnly, CoinsAndNotes }; } enum class PAYMENT_POINTINTIME : quint8 { PAY_ON_ARRIVAL, PAY_ON_EXIT, IGNORE }; /********************************************************************* * APP_ACTION * */ /* QVariant.toString() returns empty string for custom types, even if there is a .toString() method defined. From QT5.2 onwards there are new methods in QMetaType for registering comperator and converter methods: QMetaType::registerComparators() QMetaType::registerConverter() see: https://doc.qt.io/qt-5/qmetatype.html#registerComparators */ enum class APP_ACTION : int { DEFAULT_ACTION = 0x00, LICENSEPLATE_INPUT = 0x01, // License Plate Input PARKINGTIME_INPUT = 0x02, // Parking Time Input CARD_PAYMENT = 0x03, // CardPayment CHOOSE_PAYEMENT = 0x04, // Choose payment variant COIN_PAYMENT_PAYUP = 0x05, COIN_PAYMENT_PAYDOWN = 0x06, SEND_D0_CALC = 0x07, }; Q_DECLARE_METATYPE(APP_ACTION) QDebug operator<<(QDebug debug, APP_ACTION action); enum class CP_STATE : quint8 { NO_STATE = 0x00, LICENSEPLATE_INPUT = 0x01, // with accessInformation only PARKINGTIME_INPUT = 0x02, // with accessInformation and parkingtime CARDINFO_INPUT = 0x03, // with accessInformation and cardInfo }; Q_DECLARE_METATYPE(CP_STATE) #endif // ATBAPP_H