implement settings from mainwindow, and as well as settings dialog