split clobbered part of mainwindow.ccp into separate file