Change signature of painting commands, update doc, hide functions using Qt objects.