コード例 #1
0
 def lin_hover_handler(self, i: int, lin: pg.PlotItem, evt: tuple):
     if lin.sceneBoundingRect().contains(evt[0]):
         self.mouse_panel = 'lin_' + self.index_to_coord[i]
         mousepnt = lin.vb.mapSceneToView(evt[0])
         self.mouse_pos = mousepnt
         self.status_bar = "{0:#.5g}, {1:#.5g}".format(mousepnt.x(), mousepnt.y())
         self.mouse_hover.emit(self.status_bar)
         if self.shift_down:
             self.set_crosshair_to_mouse()