Revealing the Transition Dynamics from Q Switching to Mode Locking in a Soliton Laser.