Added conversion from QString to PermitType
This commit is contained in:
parent
b4b2e27fe3
commit
0a08221381
@ -122,6 +122,59 @@ struct PermitType {
|
||||
return 7;
|
||||
}
|
||||
|
||||
static PERMIT_TYPE toPermitType(QString const permitTypeStr) {
|
||||
if (permitTypeStr == "DAY_TICKET") {
|
||||
return PERMIT_TYPE::DAY_TICKET;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_ADULT") {
|
||||
return PERMIT_TYPE::DAY_TICKET_ADULT;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_CHILD") {
|
||||
return PERMIT_TYPE::DAY_TICKET_CHILD;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_ADULT") {
|
||||
return PERMIT_TYPE::DAY_TICKET_ADULT;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_TEEN") {
|
||||
return PERMIT_TYPE::DAY_TICKET_TEEN;
|
||||
} else
|
||||
if (permitTypeStr == "SHORT_TERM_PARKING") {
|
||||
return PERMIT_TYPE::SHORT_TERM_PARKING;
|
||||
} else
|
||||
if (permitTypeStr == "SZEGED_START") {
|
||||
return PERMIT_TYPE::SZEGED_START;
|
||||
} else
|
||||
if (permitTypeStr == "SZEGED_STOP") {
|
||||
return PERMIT_TYPE::SZEGED_STOP;
|
||||
} else
|
||||
if (permitTypeStr == "FOOD_STAMP") {
|
||||
return PERMIT_TYPE::FOOD_STAMP;
|
||||
} else
|
||||
if (permitTypeStr == "TWENTY_FOUR_HOURS_TICKET") {
|
||||
return PERMIT_TYPE::TWENTY_FOUR_HOURS_TICKET;
|
||||
} else
|
||||
if (permitTypeStr == "SHORT_TERM_PARKING_PKW") {
|
||||
return PERMIT_TYPE::SHORT_TERM_PARKING_PKW;
|
||||
} else
|
||||
if (permitTypeStr == "SHORT_TERM_PARKING_BUS") {
|
||||
return PERMIT_TYPE::SHORT_TERM_PARKING_BUS;
|
||||
} else
|
||||
if (permitTypeStr == "SHORT_TERM_PARKING_CAMPER") {
|
||||
return PERMIT_TYPE::SHORT_TERM_PARKING_CAMPER;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_PKW") {
|
||||
return PERMIT_TYPE::DAY_TICKET_PKW;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_BUS") {
|
||||
return PERMIT_TYPE::DAY_TICKET_BUS;
|
||||
} else
|
||||
if (permitTypeStr == "DAY_TICKET_CAMPER") {
|
||||
return PERMIT_TYPE::DAY_TICKET_CAMPER;
|
||||
}
|
||||
|
||||
return PERMIT_TYPE::INVALID;
|
||||
}
|
||||
|
||||
QString toString() {
|
||||
switch(m_permitType) {
|
||||
case PERMIT_TYPE::DAY_TICKET:
|
||||
|
Loading…
Reference in New Issue
Block a user