Commit Graph

527 Commits (a7d3afc9b14d8b631a06e9d282d41583223024eb)

Author SHA1 Message Date
Conrad Steenberg afafe56ec0 Remove List typing 2021-07-21 18:30:50 -07:00
Conrad Steenberg c830183073 More fixes, some reversions 2021-07-21 18:26:24 -07:00
Conrad Steenberg 3912b22b41 Fix a few QtGui -> QtWidget issues 2021-07-21 18:26:24 -07:00
Conrad Steenberg 9d8d8fd1a2 Fix PyQt5 error 2021-07-21 10:53:40 -07:00
Tyler Goodlet 83ad071cb4 Load provider search engines in tasks instead of exit stack 2021-07-11 11:13:35 -04:00
Tyler Goodlet 90588018a6 Label doc tweak 2021-07-11 11:13:35 -04:00
Tyler Goodlet 26c333ff22 Only close event send side (facepalm) 2021-07-08 10:55:47 -04:00
Tyler Goodlet 48053588da Don't cancel handler nursery, let errors bubble 2021-07-08 10:55:47 -04:00
Tyler Goodlet 830ef90721 Enable contents labels on q for "query" 2021-07-08 10:55:47 -04:00
Tyler Goodlet 8b966cd7e4 Port all to use new cursor and ohlc refs 2021-07-08 10:55:47 -04:00
Tyler Goodlet b6eeed1ae0 Move contents labels management to cursor mod
Add a new type/api to manage "contents labels" (labels that sit in
a view and display info about viewed data) since it's mostly used by
the linked charts cursor. Make `LinkedSplits.cursor` the new and only
instance var for the cursor such that charts can look it up from that
common class. Drop the `ChartPlotWidget._ohlc` array, just add
a `'ohlc'` entry to `._arrays`.
2021-07-08 10:55:47 -04:00
Tyler Goodlet d3d5d4ad06 Drop global order lines map
Orders in order mode should be chart oriented since there's a mode per
chart. If you want all orders just ask the ems or query all the charts
in a loop.

This fixes cancel-all-orders such that when 'cc' is tapped only the
orders on the *current* chart are cancelled, lel.
2021-07-08 10:55:47 -04:00
Tyler Goodlet 91209b7d6e Use group status for symbol loading 2021-07-08 10:55:47 -04:00
Tyler Goodlet 37180a4e4e Fix old msg clearing var name 2021-07-08 10:55:47 -04:00
Tyler Goodlet eeeeb29f71 Add order cancellation and submission statuses
Generalize the methods for cancelling groups of orders (all or those
under cursor) and add new group status support such that statuses for
each cancel or order submission is displayed in the status bar. In the
"cancel-all-orders" case, use the new group status stuff.
2021-07-08 10:55:47 -04:00
Tyler Goodlet 572f984d06 Add an all order lines getter method 2021-07-08 10:55:47 -04:00
Tyler Goodlet 0133f0b589 Add "group statuses" support to status bar
Allows for submitting a top level "group status" associated with
a "group key" which eventually resolves once all sub-statuses associated
with that group key (and thus top level status) complete and are also
removed. Also add support for a "final message" for each status such
that once the status clear callback is called a final msg is placed on
the status bar that is then removed when the next status is set.

It's all a questionable bunch of closures/callbacks but it worx.
2021-07-08 10:55:47 -04:00
Tyler Goodlet 53074b552a Add fast tap key sequence support and order-mode-type statuses 2021-07-08 10:55:47 -04:00
Tyler Goodlet 3650db3321 Make alerts solid line only 2021-07-08 10:55:47 -04:00
Tyler Goodlet 0ded790330 Didn't end up needing a task stack 2021-07-08 10:55:47 -04:00
Tyler Goodlet ca23825aff Start input handling **after** order mode is up 2021-07-08 10:55:47 -04:00
Tyler Goodlet c971997f1a Don't access unset cursor 2021-07-08 10:55:47 -04:00
Tyler Goodlet aabbc12b82 Beautifully simplify kb handling code with set ops 2021-07-08 10:55:47 -04:00
Tyler Goodlet 983a517a8c Drop old commented behaviour; see parent class if needed 2021-07-08 10:55:47 -04:00
Tyler Goodlet 03c95ca908 Factor press and release handling into same qtloop 2021-07-08 10:55:47 -04:00
Tyler Goodlet 569b2efb51 Move region selection to editors mod 2021-07-08 10:55:47 -04:00
Tyler Goodlet 4a37cf768f Move line and arrow editors to new mod 2021-07-08 10:55:47 -04:00
Tyler Goodlet 93af8c936c Port cursor and axes to new widget names 2021-07-08 10:55:47 -04:00
Tyler Goodlet 75804a441c Convert view box to async input handling
Instead of callbacks for key presses/releases convert our `ChartView`'s
kb input handling to async code using our event relaying-over-mem-chan
system. This is a first step toward a more async driven modal control
UX. Changed a bunch of "chart" component naming as part of this as well,
namely: `ChartSpace` -> `GodWidget` and `LinkedSplitCharts` ->
`LinkedSplits`. Engage the view boxe's async handler code as part of new
symbol data loading in `display_symbol_data()`. More re-orging to come!
2021-07-08 10:55:47 -04:00
Tyler Goodlet 85621af8af Extend Qt event relaying
Add an `open_handler()` ctx manager for wholesale handling event sets
with a passed in async func. Better document and implement the event
filtering core including adding support for key "auto repeat" filtering;
it turns out the events delivered when `trio` does its guest-most tick
are not the same (Qt has somehow consumed them or something) so we have
to do certain things (like getting the `.type()`, `.isAutoRepeat()`,
etc.) before shipping over the mem chan. The alt might be to copy the
event objects first but haven't tried it yet. For now just offer
auto-repeat filtering through a flag.
2021-07-08 10:55:47 -04:00
Tyler Goodlet df2f6487ff Apply `brokerd` quote rate throttling when requested in `open_feed()` 2021-06-14 21:55:51 -04:00
Tyler Goodlet f320f95288 Drop old hi-dpi font inches sizes 2021-06-13 23:59:02 -04:00
Tyler Goodlet d269edc0b3 Re-org main window singleton into a new module
Avoids some cyclical and confusing import time stuff that we needed to get
DPI aware fonts configured from the active display. Move the main window
singleton into its own module and add a `main_window()` getter for it.
Make `current_screen()` a ``MainWindow` method to avoid so many module
variables.
2021-06-13 23:47:52 -04:00
Tyler Goodlet 84f61c9a92 Avoid clearing cached results; detect repeats later 2021-06-10 13:23:28 -04:00
Tyler Goodlet 0dcadec11a Add multi-status updates throughout chart init 2021-06-10 13:23:28 -04:00
Tyler Goodlet 90b0673052 Add multi-status support to window 2021-06-10 13:23:28 -04:00
Tyler Goodlet ce67022e2e Only add font size scaled down when dpi scaling > 2 2021-06-10 13:23:28 -04:00
Tyler Goodlet 9d31f8ca6a Add default "small" dpi aware font 2021-06-10 13:23:28 -04:00
Tyler Goodlet f68295653d Load cache search before other providers 2021-06-10 13:23:28 -04:00
Tyler Goodlet 112b3f0f07 Drop hidpi font size hacking from contents labels 2021-06-10 13:23:28 -04:00
Tyler Goodlet e924cbeb43 Min debounce period for faster cached completions 2021-06-10 13:23:28 -04:00
Tyler Goodlet 62c456f8eb Downscale fonts on scaled-down hidpi displays 2021-06-10 13:23:28 -04:00
Tyler Goodlet 193f4f945c Flip to using scaled hi DPI detected by Qt 2021-06-10 13:23:28 -04:00
Tyler Goodlet bb1c549d94 Add some initial status updates during startup 2021-06-10 13:23:28 -04:00
Tyler Goodlet df50700aa5 Style a basic status bar and add a mode label to it 2021-06-10 13:23:28 -04:00
Tyler Goodlet a9cdb94ff3 Port styling to latest `qtdarkstyle` version 2021-06-10 13:23:28 -04:00
Tyler Goodlet 74b63b9868 Add mode label to right side 2021-06-10 13:23:28 -04:00
Tyler Goodlet cc60ad46fc Skip chart updates if parent widget is hidden to save cpus 2021-06-10 13:23:28 -04:00
Tyler Goodlet 7da7dee02b Add mode name to viewbox 2021-06-10 13:23:28 -04:00
Tyler Goodlet 78e04e66a5 Add mode names to search, repair LIFO ordering on select 2021-06-10 13:23:28 -04:00