'Handle mouse wheel zooming.'

def wheel_zoom(self, event):

    delta = qtcompat.wheel_delta(event)
    zoom = math.pow(2.0, (delta / 512.0))
    factor = self.transform().scale(zoom, zoom).mapRect(QtCore.QRectF(0.0, 0.0, 1.0, 1.0)).width()
    if ((factor < 0.014) or (factor > 42.0)):
        return
    self.setTransformationAnchor(QtWidgets.QGraphicsView.AnchorUnderMouse)
    self.zoom = zoom
    self.scale(zoom, zoom)
