Add functionality to ImageWidget widget and link with the MainWindow