move global variables to MainWindow class