def METHOD_NAME(self, event):
    """
    Handles all mouse press events.
    :param event: QMouseEvent instance
    """
    self.update()
    self._originally_movable = self.flags() & QtWidgets.QGraphicsItem.ItemIsMovable
    if event.pos().x() > (self.rect().right() - self._border):
        self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, False)
        self._edge = "right"
    elif event.pos().x() < (self.rect().left() + self._border):
        self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, False)
        self._edge = "left"
    elif event.pos().y() < (self.rect().top() + self._border):
        self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, False)
        self._edge = "top"
    elif event.pos().y() > (self.rect().bottom() - self._border):
        self.setFlag(QtWidgets.QGraphicsItem.ItemIsMovable, False)
        self._edge = "bottom"
    QtWidgets.QGraphicsItem.METHOD_NAME(self, event)