E5Gui/E5ModelToolBar.py

changeset 2990
583beaf0b4b8
parent 2467
33f1bcfdd65e
child 3034
7ce719013078
child 3057
10516539f238
--- a/E5Gui/E5ModelToolBar.py	Sun Oct 06 19:14:26 2013 +0200
+++ b/E5Gui/E5ModelToolBar.py	Sun Oct 06 19:45:29 2013 +0200
@@ -8,7 +8,8 @@
 """
 
 from PyQt4.QtCore import pyqtSignal, qVersion, Qt, QModelIndex, QPoint, QEvent
-from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, QToolButton
+from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, \
+    QToolButton
 
 
 class E5ModelToolBar(QToolBar):
@@ -54,17 +55,23 @@
         """
         if self.__model is not None:
             self.__model.modelReset[()].disconnect(self._build)
-            self.__model.rowsInserted[QModelIndex, int, int].disconnect(self._build)
-            self.__model.rowsRemoved[QModelIndex, int, int].disconnect(self._build)
-            self.__model.dataChanged[QModelIndex, QModelIndex].disconnect(self._build)
+            self.__model.rowsInserted[QModelIndex, int, int].disconnect(
+                self._build)
+            self.__model.rowsRemoved[QModelIndex, int, int].disconnect(
+                self._build)
+            self.__model.dataChanged[QModelIndex, QModelIndex].disconnect(
+                self._build)
         
         self.__model = model
         
         if self.__model is not None:
             self.__model.modelReset[()].connect(self._build)
-            self.__model.rowsInserted[QModelIndex, int, int].connect(self._build)
-            self.__model.rowsRemoved[QModelIndex, int, int].connect(self._build)
-            self.__model.dataChanged[QModelIndex, QModelIndex].connect(self._build)
+            self.__model.rowsInserted[QModelIndex, int, int].connect(
+                self._build)
+            self.__model.rowsRemoved[QModelIndex, int, int].connect(
+                self._build)
+            self.__model.dataChanged[QModelIndex, QModelIndex].connect(
+                self._build)
     
     def model(self):
         """
@@ -225,7 +232,8 @@
             super().mouseMoveEvent(evt)
             return
         
-        manhattanLength = (evt.pos() - self.__dragStartPosition).manhattanLength()
+        manhattanLength = (evt.pos() - 
+                           self.__dragStartPosition).manhattanLength()
         if manhattanLength <= QApplication.startDragDistance():
             super().mouseMoveEvent(evt)
             return

eric ide

mercurial