Graphics/UMLGraphicsView.py

branch
maintenance
changeset 5633
1a767ca5bbf3
parent 5389
9b1c800daff3
child 5680
b93cb6353cc0
equal deleted inserted replaced
5612:ec9b9badcfdf 5633:1a767ca5bbf3
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