Snapshot/SnapshotTimer.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 2993
4933ac9daa80
child 3058
0a02c433f52d
--- a/Snapshot/SnapshotTimer.py	Tue Oct 15 22:03:54 2013 +0200
+++ b/Snapshot/SnapshotTimer.py	Fri Oct 18 23:00:41 2013 +0200
@@ -38,8 +38,8 @@
         
         # text is taken from paintEvent with maximum number plus some margin
         self.resize(
-            self.fontMetrics().width(
-                self.trUtf8("Snapshot will be taken in %n seconds", "", 99)) + 6,
+            self.fontMetrics().width(self.trUtf8(
+                "Snapshot will be taken in %n seconds", "", 99)) + 6,
             self.fontMetrics().height() + 4)
         
         self.__timer.timeout.connect(self.__bell)
@@ -51,7 +51,8 @@
         @param seconds timeout value (integer)
         """
         screenGeom = QApplication.desktop().screenGeometry()
-        self.move(screenGeom.width() // 2 - self.size().width() // 2, screenGeom.top())
+        self.move(screenGeom.width() // 2 - self.size().width() // 2,
+                  screenGeom.top())
         self.__toggle = True
         self.__time = 0
         self.__length = seconds
@@ -102,7 +103,8 @@
                                    self.__length - self.__time)
             textRect = painter.boundingRect(self.rect().adjusted(2, 2, -2, -2),
                 Qt.AlignHCenter | Qt.TextSingleLine, helpText)
-            painter.drawText(textRect, Qt.AlignHCenter | Qt.TextSingleLine, helpText)
+            painter.drawText(textRect, Qt.AlignHCenter | Qt.TextSingleLine,
+                             helpText)
     
     def enterEvent(self, evt):
         """
@@ -113,7 +115,8 @@
         screenGeom = QApplication.desktop().screenGeometry()
         if self.x() == screenGeom.left():
             self.move(
-                screenGeom.x() + (screenGeom.width() // 2 - self.size().width() // 2),
+                screenGeom.x() + (screenGeom.width() // 2 - \
+                    self.size().width() // 2),
                 screenGeom.top())
         else:
             self.move(screenGeom.topLeft())

eric ide

mercurial