Network/IRC/IrcMessageEdit.py

changeset 3656
441956d8fce5
parent 3178
f25fc1364c88
child 3778
0c5bc18da740
equal deleted inserted replaced
3654:ffeb85cdc72d 3656:441956d8fce5
7 Module implementing a specialized line edit for entering IRC messages. 7 Module implementing a specialized line edit for entering IRC messages.
8 """ 8 """
9 9
10 from __future__ import unicode_literals 10 from __future__ import unicode_literals
11 11
12 from PyQt4.QtCore import Qt 12 from PyQt5.QtCore import Qt
13 13
14 from E5Gui.E5LineEdit import E5LineEdit, E5ClearableLineEdit 14 from E5Gui.E5LineEdit import E5LineEdit, E5ClearableLineEdit
15 15
16 16
17 class IrcMessageEdit(E5ClearableLineEdit): 17 class IrcMessageEdit(E5ClearableLineEdit):
73 """ 73 """
74 Protected slot to support wheel events. 74 Protected slot to support wheel events.
75 75
76 @param evt reference to the wheel event (QWheelEvent) 76 @param evt reference to the wheel event (QWheelEvent)
77 """ 77 """
78 if evt.delta() > 0: 78 if evt.angleDelta().y() > 0:
79 self.__getHistory(True) 79 self.__getHistory(True)
80 elif evt.delta() < 0: 80 elif evt.angleDelta().y() < 0:
81 self.__getHistory(False) 81 self.__getHistory(False)
82 82
83 super(IrcMessageEdit, self).wheelEvent(evt) 83 super(IrcMessageEdit, self).wheelEvent(evt)
84 84
85 def __addHistory(self, txt): 85 def __addHistory(self, txt):

eric ide

mercurial