processEvents, draw, mainLoop -- moved to separate translation unit.