This is cleaner than the anonymus class and allows one to use the enum as types for variables rather than having to use int/qreal