(self, event)
| 359 | guiEvent=event)._process() |
| 360 | |
| 361 | def wheelEvent(self, event): |
| 362 | # from QWheelEvent::pixelDelta doc: pixelDelta is sometimes not |
| 363 | # provided (`isNull()`) and is unreliable on X11 ("xcb"). |
| 364 | if (event.pixelDelta().isNull() |
| 365 | or QtWidgets.QApplication.instance().platformName() == "xcb"): |
| 366 | steps = event.angleDelta().y() / 120 |
| 367 | else: |
| 368 | steps = event.pixelDelta().y() |
| 369 | if steps and self.figure is not None: |
| 370 | MouseEvent("scroll_event", self, |
| 371 | *self.mouseEventCoords(event), step=steps, |
| 372 | modifiers=self._mpl_modifiers(), |
| 373 | guiEvent=event)._process() |
| 374 | |
| 375 | def keyPressEvent(self, event): |
| 376 | key = self._get_key(event) |
nothing calls this directly
no test coverage detected