(self)
| 26 | drawsig = pyqtSignal(bool) |
| 27 | |
| 28 | def __init__(self): |
| 29 | super(draw, self).__init__() |
| 30 | self.setWindowTitle("QPainter画图") |
| 31 | self._painter = QPainter() |
| 32 | self.scale = 1.0 |
| 33 | self.pixmap = QPixmap() |
| 34 | self.setMouseTracking(True) |
| 35 | self.setFocusPolicy(Qt.WheelFocus) |
| 36 | self.drawEnable = False |
| 37 | self.points = [] |
| 38 | self.current_points = [] |
| 39 | self.drawsig.connect(self.setDrawEnable) |
| 40 | |
| 41 | |
| 42 | def setDrawEnable(self, enable=False): |
nothing calls this directly
no outgoing calls
no test coverage detected