Snapshot/SnapshotFreehandGrabber.py

branch
Py2 comp.
changeset 2525
8b507a9a2d40
parent 2302
f29e9405c851
child 3057
10516539f238
equal deleted inserted replaced
2523:139f182b72f6 2525:8b507a9a2d40
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a grabber widget for a freehand snapshot region. 7 Module implementing a grabber widget for a freehand snapshot region.
8 """ 8 """
9
10 from __future__ import unicode_literals # __IGNORE_WARNING__
9 11
10 from PyQt4.QtCore import pyqtSignal, Qt, QRect, QPoint, QTimer, qVersion 12 from PyQt4.QtCore import pyqtSignal, Qt, QRect, QPoint, QTimer, qVersion
11 from PyQt4.QtGui import QWidget, QPixmap, QColor, QRegion, QApplication, QPainter, \ 13 from PyQt4.QtGui import QWidget, QPixmap, QColor, QRegion, QApplication, QPainter, \
12 QPalette, QToolTip, QPolygon, QPen, QBrush, QPaintEngine 14 QPalette, QToolTip, QPolygon, QPen, QBrush, QPaintEngine
13 15
46 48
47 def __init__(self): 49 def __init__(self):
48 """ 50 """
49 Constructor 51 Constructor
50 """ 52 """
51 super().__init__(None, 53 super(SnapshotFreehandGrabber, self).__init__(None,
52 Qt.X11BypassWindowManagerHint | Qt.WindowStaysOnTopHint | 54 Qt.X11BypassWindowManagerHint | Qt.WindowStaysOnTopHint |
53 Qt.FramelessWindowHint | Qt.Tool) 55 Qt.FramelessWindowHint | Qt.Tool)
54 56
55 self.__selection = QPolygon() 57 self.__selection = QPolygon()
56 self.__mouseDown = False 58 self.__mouseDown = False

eric ide

mercurial