Exemplo n.º 1
0
 def mouseDoubleClickEvent(self, event):
     if event.button() == Qt.LeftButton:
         if self.next_fit:
             self.zoom_fit()
         else:
             self.zoom_full()
     QGraphicsView.mouseDoubleClickEvent(self, event)
Exemplo n.º 2
0
        def mouseDoubleClickEvent(self, event):
            """ Show entire image.
            """
            scenePos = self.mapToScene(event.pos())
            if event.button() == Qt.LeftButton:
                self.leftMouseButtonDoubleClicked.emit(scenePos.x(),
                                                       scenePos.y())
            elif event.button() == Qt.RightButton:
                if self.canZoom:
                    self.zoomStack = []  # Clear zoom stack.
                    self.updateViewer()
                self.rightMouseButtonDoubleClicked.emit(
                    scenePos.x(), scenePos.y())

            QGraphicsView.mouseDoubleClickEvent(self, event)