eric6/Graphics/UMLGraphicsView.py

branch
without_py2_and_pyqt4
changeset 7198
684261ef2165
parent 6942
2602857055c5
child 7229
53054eb5b15a
equal deleted inserted replaced
7197:331569d44b19 7198:684261ef2165
23 23
24 import UI.Config 24 import UI.Config
25 import UI.PixmapCache 25 import UI.PixmapCache
26 26
27 import Preferences 27 import Preferences
28 from Globals import qVersionTuple
29 28
30 29
31 class UMLGraphicsView(E5GraphicsView): 30 class UMLGraphicsView(E5GraphicsView):
32 """ 31 """
33 Class implementing a specialized E5GraphicsView for our diagrams. 32 Class implementing a specialized E5GraphicsView for our diagrams.
600 Protected method to handle wheel events. 599 Protected method to handle wheel events.
601 600
602 @param evt reference to the wheel event (QWheelEvent) 601 @param evt reference to the wheel event (QWheelEvent)
603 """ 602 """
604 if evt.modifiers() & Qt.ControlModifier: 603 if evt.modifiers() & Qt.ControlModifier:
605 if qVersionTuple() >= (5, 0, 0): 604 delta = evt.angleDelta().y()
606 delta = evt.angleDelta().y()
607 else:
608 delta = evt.delta()
609 if delta < 0: 605 if delta < 0:
610 self.zoomOut() 606 self.zoomOut()
611 elif delta > 0: 607 elif delta > 0:
612 self.zoomIn() 608 self.zoomIn()
613 evt.accept() 609 evt.accept()

eric ide

mercurial