Snapshot/SnapshotFreehandGrabber.py

changeset 3034
7ce719013078
parent 3030
4a0a82ddd9d2
child 3039
8dd0165d805d
--- a/Snapshot/SnapshotFreehandGrabber.py	Sat Oct 19 12:28:12 2013 +0200
+++ b/Snapshot/SnapshotFreehandGrabber.py	Sat Oct 19 13:03:39 2013 +0200
@@ -166,9 +166,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:
@@ -188,7 +188,7 @@
                 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():
             # at bottom, right aligned
@@ -210,7 +210,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)
@@ -325,8 +325,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