| 18 | |
| 19 | |
| 20 | class CustomViewBox(pg.ViewBox): |
| 21 | def __init__(self, *args, **kwds): |
| 22 | pg.ViewBox.__init__(self, *args, **kwds) |
| 23 | self.RectMode = 3 |
| 24 | self.setMouseMode(self.RectMode) |
| 25 | |
| 26 | def mouseClickEvent(self, ev): |
| 27 | if ev.button() == pg.QtCore.Qt.RightButton: |
| 28 | self.autoRange() |
| 29 | |
| 30 | def mouseDragEvent(self, ev): |
| 31 | pg.ViewBox.mouseDragEvent(self, ev) |
| 32 | |
| 33 | def wheelEvent(self, ev, axis=None): |
| 34 | # pg.ViewBox.wheelEvent(self, ev, axis) |
| 35 | ev.ignore() |
| 36 | |
| 37 | |
| 38 | class graphAnalysis(QDialog, graph_Form): |