diff -r 9986ec0e559a -r 10516539f238 E5Gui/E5ModelMenu.py --- a/E5Gui/E5ModelMenu.py Tue Oct 15 22:03:54 2013 +0200 +++ b/E5Gui/E5ModelMenu.py Fri Oct 18 23:00:41 2013 +0200 @@ -10,7 +10,8 @@ from __future__ import unicode_literals # __IGNORE_WARNING__ from PyQt4.QtCore import pyqtSignal, qVersion, Qt, QModelIndex, QPoint -from PyQt4.QtGui import QMenu, QFontMetrics, QAction, QApplication, QDrag, QPixmap +from PyQt4.QtGui import QMenu, QFontMetrics, QAction, QApplication, QDrag, \ + QPixmap import UI.PixmapCache @@ -184,7 +185,8 @@ def createMenu(self, parent, max_, parentMenu=None, menu=None): """ - Public method to put all the children of a parent into a menu of a given length. + Public method to put all the children of a parent into a menu of a + given length. @param parent index of the parent item (QModelIndex) @param max_ maximum number of entries (integer) @@ -222,7 +224,8 @@ if self.__model.hasChildren(idx): self.createMenu(idx, -1, menu) else: - if self.__separatorRole != 0 and idx.data(self.__separatorRole): + if self.__separatorRole != 0 and \ + idx.data(self.__separatorRole): self.addSeparator() else: menu.addAction(self.__makeAction(idx)) @@ -254,7 +257,7 @@ @param icon icon of the action (QIcon) @param text text of the action (string) - @param reference to the parent object (QObject) + @param parent reference to the parent object (QObject) @return reference to the created action (QAction) """ fm = QFontMetrics(self.font()) @@ -362,7 +365,8 @@ super(E5ModelMenu, self).mouseMoveEvent(evt) return - manhattanLength = (evt.pos() - self.__dragStartPosition).manhattanLength() + manhattanLength = (evt.pos() - + self.__dragStartPosition).manhattanLength() if manhattanLength <= QApplication.startDragDistance(): super(E5ModelMenu, self).mouseMoveEvent(evt) return