IconEditor/IconEditorWindow.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2404
cba0ff902c2b
child 2847
1843ef6e2656
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing the icon editor main window. 7 Module implementing the icon editor main window.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 from PyQt4.QtCore import pyqtSignal, Qt, QSize, QSignalMapper, QFileInfo, QFile, \ 12 from PyQt4.QtCore import pyqtSignal, Qt, QSize, QSignalMapper, QFileInfo, QFile, \
11 QEvent 13 QEvent
12 from PyQt4.QtGui import QScrollArea, QPalette, QImage, QImageReader, QImageWriter, \ 14 from PyQt4.QtGui import QScrollArea, QPalette, QImage, QImageReader, QImageWriter, \
13 QKeySequence, qApp, QLabel, QDockWidget, QWhatsThis 15 QKeySequence, qApp, QLabel, QDockWidget, QWhatsThis
45 @keyparam fromEric flag indicating whether it was called from within 47 @keyparam fromEric flag indicating whether it was called from within
46 eric5 (boolean) 48 eric5 (boolean)
47 @keyparam initShortcutsOnly flag indicating to just initialize the keyboard 49 @keyparam initShortcutsOnly flag indicating to just initialize the keyboard
48 shortcuts (boolean) 50 shortcuts (boolean)
49 """ 51 """
50 super().__init__(parent) 52 super(IconEditorWindow, self).__init__(parent)
51 self.setObjectName("eric5_icon_editor") 53 self.setObjectName("eric5_icon_editor")
52 self.setAttribute(Qt.WA_DeleteOnClose) 54 self.setAttribute(Qt.WA_DeleteOnClose)
53 55
54 self.fromEric = fromEric 56 self.fromEric = fromEric
55 self.initShortcutsOnly = initShortcutsOnly 57 self.initShortcutsOnly = initShortcutsOnly
1221 else: 1223 else:
1222 self.__zoomIn() 1224 self.__zoomIn()
1223 evt.accept() 1225 evt.accept()
1224 return 1226 return
1225 1227
1226 super().wheelEvent(evt) 1228 super(IconEditorWindow, self).wheelEvent(evt)
1227 1229
1228 def event(self, evt): 1230 def event(self, evt):
1229 """ 1231 """
1230 Protected method handling events. 1232 Protected method handling events.
1231 1233
1234 """ 1236 """
1235 if evt.type() == QEvent.Gesture: 1237 if evt.type() == QEvent.Gesture:
1236 self.gestureEvent(evt) 1238 self.gestureEvent(evt)
1237 return True 1239 return True
1238 1240
1239 return super().event(evt) 1241 return super(IconEditorWindow, self).event(evt)
1240 1242
1241 def gestureEvent(self, evt): 1243 def gestureEvent(self, evt):
1242 """ 1244 """
1243 Protected method handling gesture events. 1245 Protected method handling gesture events.
1244 1246

eric ide

mercurial