Translated code to QGraphicsView and menu stuff