Snapshot/SnapshotFreehandGrabber.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3039
8dd0165d805d
child 3145
a9de05d4a22f
--- a/Snapshot/SnapshotFreehandGrabber.py	Fri Nov 01 15:48:48 2013 +0100
+++ b/Snapshot/SnapshotFreehandGrabber.py	Sun Nov 03 15:58:22 2013 +0100
@@ -168,9 +168,9 @@
         boundingRect = textRect.adjusted(-4, 0, 0, 0)
         
         polBoundingRect = pol.boundingRect()
-        if (textRect.width() < 
+        if (textRect.width() <
             polBoundingRect.width() - 2 * self.__handleSize) and \
-           (textRect.height() < 
+           (textRect.height() <
             polBoundingRect.height() - 2 * self.__handleSize) and \
            polBoundingRect.width() > 100 and \
            polBoundingRect.height() > 100:
@@ -178,7 +178,7 @@
             boundingRect.moveCenter(polBoundingRect.center())
             textRect.moveCenter(polBoundingRect.center())
         elif polBoundingRect.y() - 3 > textRect.height() and \
-             polBoundingRect.x() + textRect.width() < self.rect().width():
+                polBoundingRect.x() + textRect.width() < self.rect().width():
             # on top, left aligned
             boundingRect.moveBottomLeft(
                 QPoint(polBoundingRect.x(), polBoundingRect.y() - 3))
@@ -190,9 +190,9 @@
                 QPoint(polBoundingRect.x() - 3, polBoundingRect.y()))
             textRect.moveTopRight(
                 QPoint(polBoundingRect.x() - 5, polBoundingRect.y()))
-        elif (polBoundingRect.bottom() + 3 + textRect.height() < 
+        elif (polBoundingRect.bottom() + 3 + textRect.height() <
               self.rect().bottom()) and \
-             polBoundingRect.right() > textRect.width():
+                polBoundingRect.right() > textRect.width():
             # at bottom, right aligned
             boundingRect.moveTopRight(
                 QPoint(polBoundingRect.right(), polBoundingRect.bottom() + 3))
@@ -212,7 +212,7 @@
         drawPolygon(painter, boundingRect, textColor, textBackgroundColor)
         painter.drawText(textRect, Qt.AlignHCenter, txt)
         
-        if (polBoundingRect.height() > self.__handleSize * 2 and \
+        if (polBoundingRect.height() > self.__handleSize * 2 and
             polBoundingRect.width() > self.__handleSize * 2) or \
            not self.__mouseDown:
             painter.setBrush(Qt.transparent)
@@ -327,8 +327,8 @@
             pt.begin(pixmap2)
             if pt.paintEngine().hasFeature(QPaintEngine.PorterDuff):
                 pt.setRenderHints(
-                    QPainter.Antialiasing | \
-                    QPainter.HighQualityAntialiasing | \
+                    QPainter.Antialiasing |
+                    QPainter.HighQualityAntialiasing |
                     QPainter.SmoothPixmapTransform,
                     True)
                 pt.setBrush(Qt.black)

eric ide

mercurial