E5Gui/E5ModelToolBar.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2990
583beaf0b4b8
child 3060
5883ce99ee12
--- a/E5Gui/E5ModelToolBar.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/E5Gui/E5ModelToolBar.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, QEvent
-from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, QToolButton
+from PyQt4.QtGui import QApplication, QDrag, QPixmap, QToolBar, QIcon, \
+    QToolButton
 
 
 class E5ModelToolBar(QToolBar):
@@ -56,17 +57,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):
         """
@@ -227,7 +234,8 @@
             super(E5ModelToolBar, self).mouseMoveEvent(evt)
             return
         
-        manhattanLength = (evt.pos() - self.__dragStartPosition).manhattanLength()
+        manhattanLength = (evt.pos() - 
+                           self.__dragStartPosition).manhattanLength()
         if manhattanLength <= QApplication.startDragDistance():
             super(E5ModelToolBar, self).mouseMoveEvent(evt)
             return

eric ide

mercurial