def wheel_translation(event):
 if PYQT4:
  tx = event.delta()
  ty = 0.0
  if (event.orientation() == Qt.Vertical):
   (tx, ty) = (ty, tx)
 else:
  angle = event.angleDelta()
  tx = angle.x()
  ty = angle.y()
 return (tx, ty)

def wheel_translation ( event ) : if PYQT4 : tx = event . delta ( ) ty = 0.0 if ( event . orientation ( ) == Qt . Vertical ) : ( tx , ty ) = ( ty , tx ) else : angle = event . angleDelta ( ) tx = angle . x ( ) ty = angle . y ( ) return ( tx , ty )
return the tx ty translation delta for a pan .