'Move the ROI to a new position.
Accepts either (x, y, snap) or ([x,y], snap) as arguments
If the ROI is bounded and the move would exceed boundaries, then the ROI
is moved to the nearest acceptable position instead.
*snap* can be:
None (default)  use self.translateSnap and self.snapSize to determine whether/how to snap
False           do not snap
Point(w,h)      snap to rectangular grid with spacing (w,h)
True            snap using self.snapSize (and ignoring self.translateSnap)
Also accepts *update* and *finish* arguments (see setPos() for a description of these).'

def translate(self, *args, **kargs):

    if (len(args) == 1):
        pt = args[0]
    else:
        pt = args
    newState = self.stateCopy()
    newState['pos'] = (newState['pos'] + pt)
    snap = kargs.get('snap', None)
    if (snap is None):
        snap = self.translateSnap
    if (snap is not False):
        newState['pos'] = self.getSnapPosition(newState['pos'], snap=snap)
    if (self.maxBounds is not None):
        r = self.stateRect(newState)
        d = Point(0, 0)
        if (self.maxBounds.left() > r.left()):
            d[0] = (self.maxBounds.left() - r.left())
        elif (self.maxBounds.right() < r.right()):
            d[0] = (self.maxBounds.right() - r.right())
        if (self.maxBounds.top() > r.top()):
            d[1] = (self.maxBounds.top() - r.top())
        elif (self.maxBounds.bottom() < r.bottom()):
            d[1] = (self.maxBounds.bottom() - r.bottom())
        newState['pos'] += d
    update = kargs.get('update', True)
    finish = kargs.get('finish', True)
    self.setPos(newState['pos'], update=update, finish=finish)
