'Translate the view by *t*, which may be a Point or tuple (x, y).
Alternately, x or y may be specified independently, leaving the other
axis unchanged (note that using a translation of 0 may still cause
small changes due to floating-point error).'

def translateBy(self, t=None, x=None, y=None):

    vr = self.targetRect()
    if (t is not None):
        t = Point(t)
        self.setRange(vr.translated(t), padding=0)
    else:
        if (x is not None):
            x = ((vr.left() + x), (vr.right() + x))
        if (y is not None):
            y = ((vr.top() + y), (vr.bottom() + y))
        if ((x is not None) or (y is not None)):
            self.setRange(xRange=x, yRange=y, padding=0)
