'Advance the auto scroll'

def __autoScrollAdvance(self):

    pos = QCursor.pos()
    pos = self.mapFromGlobal(pos)
    margin = self.__autoScrollMargin
    vvalue = self.verticalScrollBar().value()
    hvalue = self.horizontalScrollBar().value()
    vrect = QRect(0, 0, self.width(), self.height())
    advance = 10
    if vrect.contains(pos):
        if (pos.x() < (vrect.left() + margin)):
            self.horizontalScrollBar().setValue((hvalue - advance))
        if (pos.y() < (vrect.top() + margin)):
            self.verticalScrollBar().setValue((vvalue - advance))
        if (pos.x() > (vrect.right() - margin)):
            self.horizontalScrollBar().setValue((hvalue + advance))
        if (pos.y() > (vrect.bottom() - margin)):
            self.verticalScrollBar().setValue((vvalue + advance))
        if ((self.verticalScrollBar().value() == vvalue) and (self.horizontalScrollBar().value() == hvalue)):
            self.__stopAutoScroll()
    else:
        self.__stopAutoScroll()
    log.debug('Auto    scroll    advance')
