'Takes angle argument in degrees.
0 is horizontal; 90 is vertical.
Note that the use of value() and setValue() changes if the line is
not vertical or horizontal.'

def setAngle(self, angle):

    self.angle = (((angle + 45) % 180) - 45)
    self.resetTransform()
    self.rotate(self.angle)
    self.update()
