def _pick(self, p0, type): for plot in self._getPlotsForPoint(p0): (coord, _axes, _curve) = plot.pick(p0, self.dwidth, self.dheight) if coord: dcPoint = coord.getDC() QApplication.sendEvent( self, PickEvent(type, self.dwidth, self.dheight, dcPoint.x, dcPoint.y, plot.viewport, coord.getWindow()))
def _pick(self, p0, type): for plot in self._getPlotsForPoint(p0): (coord, _axes, _curve) = plot.pick(p0, self.dwidth, self.dheight) if coord: dcPoint = coord.getDC() QApplication.sendEvent(self, PickEvent(type, self.dwidth, self.dheight, dcPoint.x, dcPoint.y, plot.viewport, coord.getWindow()))
def _roi(self, p0, type, buttons, modifiers): if self._roiEnabled: for plot in self._lstPlot: roi = plot.getROI(p0) if roi: if roi.regionType == RegionOfInterest.LEGEND: eventObj = LegendEvent else: eventObj = ROIEvent coords = DeviceCoordConverter(self.dwidth, self.dheight) coords.setNDC(p0.x, p0.y) p0dc = coords.getDC() QApplication.sendEvent( self, eventObj(type, self.dwidth, self.dheight, p0dc.x, p0dc.y, buttons, modifiers, roi))
def _roi(self, p0, type, buttons, modifiers): if self._roiEnabled: for plot in self._lstPlot: roi = plot.getROI(p0) if roi: if roi.regionType == RegionOfInterest.LEGEND: eventObj = LegendEvent else: eventObj = ROIEvent coords = DeviceCoordConverter(self.dwidth, self.dheight) coords.setNDC(p0.x, p0.y) p0dc = coords.getDC() QApplication.sendEvent(self, eventObj(type, self.dwidth, self.dheight, p0dc.x, p0dc.y, buttons, modifiers, roi))