moved StateMachineBuilder
adjustments for Qt5