Graphics/UMLGraphicsView.py

changeset 5631
d0beabfaad42
parent 5587
ea526b78ee6c
child 5680
b93cb6353cc0
child 5736
000ea446ff4b
equal deleted inserted replaced
5630:11670490db05 5631:d0beabfaad42
634 @param evt reference to the gesture event (QGestureEvent 634 @param evt reference to the gesture event (QGestureEvent
635 """ 635 """
636 pinch = evt.gesture(Qt.PinchGesture) 636 pinch = evt.gesture(Qt.PinchGesture)
637 if pinch: 637 if pinch:
638 if pinch.state() == Qt.GestureStarted: 638 if pinch.state() == Qt.GestureStarted:
639 pinch.setScaleFactor(self.zoom() / 100.0) 639 pinch.setTotalScaleFactor(self.zoom() / 100.0)
640 else: 640 elif pinch.state() == Qt.GestureUpdated:
641 self.setZoom(int(pinch.scaleFactor() * 100)) 641 self.setZoom(int(pinch.totalScaleFactor() * 100))
642 evt.accept() 642 evt.accept()
643 643
644 def getItemId(self): 644 def getItemId(self):
645 """ 645 """
646 Public method to get the ID to be assigned to an item. 646 Public method to get the ID to be assigned to an item.

eric ide

mercurial