예제 #1
0
파일: bar.py 프로젝트: sdouglas/lr-notebook
 def sceneEvent(self, event):
     """Included for unit testing in order to grab events that are sent
     via QGraphicsScene.sendEvent()."""
     # if self._parent.sliceController.testRecorder:
     #     coord = (self._row, self._col)
     #     self._parent.sliceController.testRecorder.sliceSceneEvent(event, coord)
     if event.type() == QEvent.MouseButtonPress:
         self.mousePressEvent(event)
         return True
     elif event.type() == QEvent.MouseButtonRelease:
         self.mouseReleaseEvent(event)
         return True
     elif event.type() == QEvent.MouseMove:
         self.mouseMoveEvent(event)
         return True
     QGraphicsItem.sceneEvent(self, event)
     return False
예제 #2
0
 def sceneEvent(self, event):
     """Included for unit testing in order to grab events that are sent
     via QGraphicsScene.sendEvent()."""
     # if self._parent.sliceController.testRecorder:
     #     coord = (self._row, self._col)
     #     self._parent.sliceController.testRecorder.sliceSceneEvent(event, coord)
     if event.type() == QEvent.MouseButtonPress:
         self.mousePressEvent(event)
         return True
     elif event.type() == QEvent.MouseButtonRelease:
         self.mouseReleaseEvent(event)
         return True
     elif event.type() == QEvent.MouseMove:
         self.mouseMoveEvent(event)
         return True
     QGraphicsItem.sceneEvent(self, event)
     return False