def mouseReleaseEvent(self, event): """ Sends mouseReleasedSignal :param event: :return: """ pos = QtImport.QPointF(event.pos()) self.scene().parent().mouseReleasedSignal.emit(pos.x(), pos.y()) self.update()
def mousePressEvent(self, event): """ Sends mouseClickedSignal :param event: :return: """ pos = QtImport.QPointF(event.pos()) self.scene().parent().mouseClickedSignal.emit( pos.x(), pos.y(), event.button() == QtImport.Qt.LeftButton ) self.update()
def mouseDoubleClickEvent(self, event): position = QtImport.QPointF(event.pos()) # this is ugly. self.parent.navigation_item_double_clicked( 0.5 + 0.5 * position.x() / self.scene().width(), position.y() / self.scene().height())
def mouseReleaseEvent(self, event): pos = QtImport.QPointF(event.pos()) self.scene().parent().mouseReleasedSignal.emit(pos.x(), pos.y()) self.update()