def __init__(self,parent):
"""Constructor"""
self.__view = parent
super(Crosshair, self).__init__()
self.__vLine = pg.InfiniteLine(angle=90, movable=False)
self.__hLine = pg.InfiniteLine(angle=0, movable=False)
self.__textPrice = pg.TextItem('price')
self.__textDate = pg.TextItem('date')
#mid ?y??????????????????
self.__textLastPrice = pg.TextItem('lastTickPrice')
view = self.__view
view.addItem(self.__textDate, ignoreBounds=True)
view.addItem(self.__textPrice, ignoreBounds=True)
view.addItem(self.__vLine, ignoreBounds=True)
view.addItem(self.__hLine, ignoreBounds=True)
view.addItem(self.__textLastPrice, ignoreBounds=True)
self.proxy = pg.SignalProxy(view.scene().sigMouseMoved, rateLimit=60, slot=self.__mouseMoved)
#----------------------------------------------------------------------
评论列表
文章目录