(color, rotation, pointer)
| 43 | painter = QtGui.QPainter(self) |
| 44 | #zipping code to draw pointers |
| 45 | def drawPointer(color, rotation, pointer): |
| 46 | painter.setBrush(QtGui.QBrush(color)) |
| 47 | painter.save() |
| 48 | painter.rotate(rotation) |
| 49 | painter.drawConvexPolygon(pointer) |
| 50 | painter.restore() |
| 51 | #tune up painter |
| 52 | painter.setRenderHint(QtGui.QPainter.Antialiasing) |
| 53 | painter.translate(self.width() / 2, self.height() / 2) |