Added SLOTs and SIGNAL's to the mainwindow to link the GUI to the thread.