Exemplo n.º 1
0
 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()
Exemplo n.º 2
0
 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()
Exemplo n.º 3
0
 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())
Exemplo n.º 4
0
 def mouseReleaseEvent(self, event):
     pos = QtImport.QPointF(event.pos())
     self.scene().parent().mouseReleasedSignal.emit(pos.x(), pos.y())
     self.update()