Port cursor and axes to new widget names

backup_asyncify_input_modes
Tyler Goodlet 2021-06-15 18:25:03 -04:00
parent 08a21378b9
commit 23a03e3a0a
2 changed files with 6 additions and 6 deletions

View File

@ -38,7 +38,7 @@ class Axis(pg.AxisItem):
""" """
def __init__( def __init__(
self, self,
linked_charts, linkedsplits,
typical_max_str: str = '100 000.000', typical_max_str: str = '100 000.000',
min_tick: int = 2, min_tick: int = 2,
**kwargs **kwargs
@ -49,7 +49,7 @@ class Axis(pg.AxisItem):
# XXX: pretty sure this makes things slower # XXX: pretty sure this makes things slower
# self.setCacheMode(QtGui.QGraphicsItem.DeviceCoordinateCache) # self.setCacheMode(QtGui.QGraphicsItem.DeviceCoordinateCache)
self.linked_charts = linked_charts self.linkedsplits = linkedsplits
self._min_tick = min_tick self._min_tick = min_tick
self._dpi_font = _font self._dpi_font = _font
@ -132,9 +132,9 @@ class DynamicDateAxis(Axis):
) -> List[str]: ) -> List[str]:
# try: # try:
chart = self.linked_charts.chart chart = self.linkedsplits.chart
bars = chart._ohlc bars = chart._ohlc
shm = self.linked_charts.chart._shm shm = self.linkedsplits.chart._shm
first = shm._first.value first = shm._first.value
bars_len = len(bars) bars_len = len(bars)

View File

@ -203,7 +203,7 @@ class Cursor(pg.GraphicsObject):
def __init__( def __init__(
self, self,
linkedsplitcharts: 'LinkedSplitCharts', # noqa linkedsplits: 'LinkedSplits', # noqa
digits: int = 0 digits: int = 0
) -> None: ) -> None:
super().__init__() super().__init__()
@ -217,7 +217,7 @@ class Cursor(pg.GraphicsObject):
color=hcolor('davies'), color=hcolor('davies'),
style=QtCore.Qt.DashLine, style=QtCore.Qt.DashLine,
) )
self.lsc = linkedsplitcharts self.lsc = linkedsplits
self.graphics: Dict[str, pg.GraphicsObject] = {} self.graphics: Dict[str, pg.GraphicsObject] = {}
self.plots: List['PlotChartWidget'] = [] # type: ignore # noqa self.plots: List['PlotChartWidget'] = [] # type: ignore # noqa
self.active_plot = None self.active_plot = None