Use Qt namespace to simplify Ruler::paintEvent