some implemented functions of class MainWindow and simple main.cpp