You need to swap everything in there to support the enum instead of an integer. Q_ENUMS will be your friend (like in uconditiondate)