Graphics/PixmapDiagram.py

branch
maintenance
changeset 5633
1a767ca5bbf3
parent 5389
9b1c800daff3
child 5736
000ea446ff4b
equal deleted inserted replaced
5612:ec9b9badcfdf 5633:1a767ca5bbf3
220 @param evt reference to the gesture event (QGestureEvent 220 @param evt reference to the gesture event (QGestureEvent
221 """ 221 """
222 pinch = evt.gesture(Qt.PinchGesture) 222 pinch = evt.gesture(Qt.PinchGesture)
223 if pinch: 223 if pinch:
224 if pinch.state() == Qt.GestureStarted: 224 if pinch.state() == Qt.GestureStarted:
225 pinch.setScaleFactor(self.__zoom() / 100) 225 pinch.setTotalScaleFactor(self.__zoom() / 100)
226 else: 226 elif pinch.state() == Qt.GestureUpdated:
227 self.__doZoom(int(pinch.scaleFactor() * 100)) 227 self.__doZoom(int(pinch.totalScaleFactor() * 100))
228 evt.accept() 228 evt.accept()
229 229
230 ########################################################################### 230 ###########################################################################
231 ## Private menu handling methods below. 231 ## Private menu handling methods below.
232 ########################################################################### 232 ###########################################################################

eric ide

mercurial