Add permit type FOOD_STAMP

This commit is contained in:
Gerhard Hoffmann 2024-02-28 12:03:13 +01:00
parent 588a88455b
commit b751ba339e

View File

@ -11,6 +11,7 @@ enum class PERMIT_TYPE : quint8 {
DAY_TICKET_ADULT,
DAY_TICKET_TEEN,
DAY_TICKET_CHILD,
FOOD_STAMP,
INVALID
};
@ -41,6 +42,9 @@ struct PermitType {
case 6:
m_permitType = PERMIT_TYPE::DAY_TICKET_CHILD;
break;
case 7:
m_permitType = PERMIT_TYPE::FOOD_STAMP;
break;
default:
m_permitType = PERMIT_TYPE::INVALID;
}
@ -68,6 +72,8 @@ struct PermitType {
return 5;
case PERMIT_TYPE::DAY_TICKET_TEEN:
return 6;
case PERMIT_TYPE::FOOD_STAMP:
return 7;
default:
break;
}
@ -75,6 +81,30 @@ struct PermitType {
}
operator QString () {
switch(m_permitType) {
case PERMIT_TYPE::DAY_TICKET:
return QString("DAY_TICKET");
case PERMIT_TYPE::DAY_TICKET_ADULT:
return QString("DAY_TICKET_ADULT");
case PERMIT_TYPE::DAY_TICKET_CHILD:
return QString("DAY_TICKET_CHILD");
case PERMIT_TYPE::DAY_TICKET_TEEN:
return QString("DAY_TICKET_TEEN");
case PERMIT_TYPE::SHORT_TERM_PARKING:
return QString("SHORT_TERM_PARKING");
case PERMIT_TYPE::SZEGED_START:
return QString("SZEGED_START");
case PERMIT_TYPE::SZEGED_STOP:
return QString("SZEGED_STOP");
case PERMIT_TYPE::FOOD_STAMP:
return QString("FOOD_STAMP");
default:
break;
}
return QString("INVALID");
}
operator QString () const {
switch(m_permitType) {
case PERMIT_TYPE::DAY_TICKET:
@ -91,6 +121,8 @@ struct PermitType {
return QString("SZEGED_START");
case PERMIT_TYPE::SZEGED_STOP:
return QString("SZEGED_STOP");
case PERMIT_TYPE::FOOD_STAMP:
return QString("FOOD_STAMP");
default:
break;
}