Refactor the markerline into a proper QGraphicsWidget