Beispiel #1
0
 def mouseMoveEvent(self, event):
     if event.buttons() & Qt.LeftButton:
         screenPos = event.screenPos()
         buttonDown = event.buttonDownScreenPos(Qt.LeftButton)
         if (screenPos - buttonDown).manhattanLength() > 2.0:
             self.updateSelectionRect(event)
     QGraphicsScene.mouseMoveEvent(self, event)
Beispiel #2
0
 def mouseMoveEvent(self, event):
     if event.buttons() & Qt.LeftButton:
         screenPos = event.screenPos()
         buttonDown = event.buttonDownScreenPos(Qt.LeftButton)
         if (screenPos - buttonDown).manhattanLength() > 2.0:
             self.updateSelectionRect(event)
     QGraphicsScene.mouseMoveEvent(self, event)
Beispiel #3
0
    def mouseMoveEvent(self, mouseEvent):
        """Manage the mouse movement while it is pressed.

        Args:
            event(QMouseEvent): Mouse event.
        """
        QGraphicsScene.mouseMoveEvent(self, mouseEvent)
        if not mouseEvent.isAccepted() and mouseEvent.buttons() == Qt.LeftButton:
            delta = mouseEvent.lastScreenPos() - mouseEvent.screenPos()
            self.translate(delta.x(), delta.y())
Beispiel #4
0
 def mouseMoveEvent(self, event):
     if self.mode == 'Edge':
         self.mouseMoveEventEdge(event)
     elif self.mode == 'Node':
         self.mouseMoveEventNode(event)
     x = event.scenePos().x()
     y = event.scenePos().y()
     self.cursorPositionSignal.emit(x, y)
     QGraphicsScene.mouseMoveEvent(self, event)
     item = self.itemAt(event.scenePos())
     if item is not None:
         if isinstance(item, Node):
             self.nodeNumberSignal.emit(item.getNumber())
Beispiel #5
0
    def mouseMoveEvent(self, event):
        if self.user_interaction_handler and \
                self.user_interaction_handler.mouseMoveEvent(event):
            return

        return QGraphicsScene.mouseMoveEvent(self, event)
Beispiel #6
0
 def mouseMoveEvent(self, event):
     self.handleMousePos(event.scenePos())
     QGraphicsScene.mouseMoveEvent(self, event)
Beispiel #7
0
    def mouseMoveEvent(self, mouseEvent):
        QGraphicsScene.mouseMoveEvent(self, mouseEvent)

        self.__kDummy.setPos(mouseEvent.scenePos())

        self.update()
Beispiel #8
0
    def mouseMoveEvent(self, mouseEvent):
        QGraphicsScene.mouseMoveEvent(self, mouseEvent)

        self.__kDummy.setPos(mouseEvent.scenePos())
Beispiel #9
0
 def mouseMoveEvent(self, event):
     return QGraphicsScene.mouseMoveEvent(self, event)
Beispiel #10
0
 def mouseMoveEvent(o, ev):
     QGraphicsScene.mouseMoveEvent(o, ev)
     o._input_tracker.mouseMoveEvent(ev)
     if o.grab_active:
         o.repositionGrabbedPieces(ev.scenePos())