mainwindow.cpp: added SetControls function