import math


def rotation(position, wheel):
    """
    Calculate the rotation angle (in degrees) of the given position on the given wheel.

    :param position: The position os the mouse.
    :type position:  QtGui.QPosition

    :param wheel: The wheel part.
    :type wheel:  QtWidgets.QPixmapGraphicsItem

    :returns: The rotation angle of the mouse in degrees.
    :rtype:   float
    """
    center = wheel.boundingRect().center()

    position = position - center

    rotation = math.atan2(position.y(), position.x())

    return math.degrees(rotation) + 180