Updating mainwindow.cpp and mainwindow.h