Defining a slot for setting a scan finished flag when the thread finishes executing.

Also define an accessor for getting the scan finished flag.