Add some initial status updates during startup
parent
df50700aa5
commit
bb1c549d94
|
@ -51,6 +51,7 @@ from ._graphics._lines import (
|
||||||
from ._l1 import L1Labels
|
from ._l1 import L1Labels
|
||||||
from ._graphics._ohlc import BarItems
|
from ._graphics._ohlc import BarItems
|
||||||
from ._graphics._curve import FastAppendCurve
|
from ._graphics._curve import FastAppendCurve
|
||||||
|
from . import _style
|
||||||
from ._style import (
|
from ._style import (
|
||||||
_font,
|
_font,
|
||||||
hcolor,
|
hcolor,
|
||||||
|
@ -192,6 +193,8 @@ class ChartSpace(QtGui.QWidget):
|
||||||
symbol_key,
|
symbol_key,
|
||||||
loglevel,
|
loglevel,
|
||||||
)
|
)
|
||||||
|
self.window.status_bar.showMessage(
|
||||||
|
f'Loading {symbol_key}.{providername}...')
|
||||||
|
|
||||||
self.set_chart_symbol(fqsn, linkedcharts)
|
self.set_chart_symbol(fqsn, linkedcharts)
|
||||||
|
|
||||||
|
@ -1241,6 +1244,9 @@ async def spawn_fsps(
|
||||||
|
|
||||||
display_name = f'fsp.{fsp_func_name}'
|
display_name = f'fsp.{fsp_func_name}'
|
||||||
|
|
||||||
|
linked_charts.window().status_bar.showMessage(
|
||||||
|
f'Loading FSP: {display_name}...')
|
||||||
|
|
||||||
# TODO: load function here and introspect
|
# TODO: load function here and introspect
|
||||||
# return stream type(s)
|
# return stream type(s)
|
||||||
|
|
||||||
|
@ -1281,6 +1287,10 @@ async def spawn_fsps(
|
||||||
conf,
|
conf,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
status = linked_charts.window().status_bar
|
||||||
|
if display_name in status.currentMessage():
|
||||||
|
status.clearMessage()
|
||||||
|
|
||||||
# blocks here until all fsp actors complete
|
# blocks here until all fsp actors complete
|
||||||
|
|
||||||
|
|
||||||
|
@ -1541,6 +1551,9 @@ async def chart_symbol(
|
||||||
add_label=False,
|
add_label=False,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
chart_app.window.status_bar.showMessage(
|
||||||
|
f'Finished loading {sym}.{brokername}')
|
||||||
|
|
||||||
# size view to data once at outset
|
# size view to data once at outset
|
||||||
chart._set_yrange()
|
chart._set_yrange()
|
||||||
|
|
||||||
|
@ -1619,6 +1632,7 @@ async def chart_symbol(
|
||||||
# linked_charts,
|
# linked_charts,
|
||||||
# )
|
# )
|
||||||
|
|
||||||
|
linked_charts.window().status_bar.showMessage('Starting order mode...')
|
||||||
await start_order_mode(chart, symbol, brokername)
|
await start_order_mode(chart, symbol, brokername)
|
||||||
|
|
||||||
|
|
||||||
|
@ -1676,8 +1690,6 @@ async def _async_main(
|
||||||
|
|
||||||
chart_app = widgets['main']
|
chart_app = widgets['main']
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# attempt to configure DPI aware font size
|
# attempt to configure DPI aware font size
|
||||||
screen = current_screen()
|
screen = current_screen()
|
||||||
|
|
||||||
|
@ -1692,8 +1704,10 @@ async def _async_main(
|
||||||
# configure global DPI aware font size
|
# configure global DPI aware font size
|
||||||
_font.configure_to_dpi(screen)
|
_font.configure_to_dpi(screen)
|
||||||
|
|
||||||
|
# TODO: do styling / themeing setup
|
||||||
|
# _style.style_ze_sheets(chart_app)
|
||||||
|
|
||||||
sbar = chart_app.window.status_bar
|
sbar = chart_app.window.status_bar
|
||||||
sbar.setStyleSheet(f"font: {_font.px_size - 3}px")
|
|
||||||
sbar.showMessage('starting ze chartz...')
|
sbar.showMessage('starting ze chartz...')
|
||||||
|
|
||||||
async with trio.open_nursery() as root_n:
|
async with trio.open_nursery() as root_n:
|
||||||
|
|
|
@ -336,6 +336,8 @@ async def start_order_mode(
|
||||||
|
|
||||||
# Begin order-response streaming
|
# Begin order-response streaming
|
||||||
|
|
||||||
|
chart.window().status_bar.showMessage('Ready for trading')
|
||||||
|
|
||||||
# this is where we receive **back** messages
|
# this is where we receive **back** messages
|
||||||
# about executions **from** the EMS actor
|
# about executions **from** the EMS actor
|
||||||
async for msg in trades_stream:
|
async for msg in trades_stream:
|
||||||
|
|
Loading…
Reference in New Issue