Commit Graph

50 Commits (53e3909924b05e842651abb302a762cbaad38db8)

Author SHA1 Message Date
Tyler Goodlet 73a02d54b7 Down size the slots bar by .9 2022-09-12 20:25:15 -04:00
Tyler Goodlet f9bdd643cf Cast slots to `int` before range set 2022-07-09 12:09:38 -04:00
Tyler Goodlet 488506d8b8 Move feed status label generation into a new module 2022-06-05 22:07:13 -04:00
Tyler Goodlet af3d624281 Just give up on discretized pp bar for now 2022-03-03 17:15:55 -05:00
Tyler Goodlet 2c9612ebd8 Force exact pp bar size 2022-03-03 10:46:30 -05:00
Tyler Goodlet 6889a25926 Drop pp bar clipping, hopefully fix slot sizing 2022-03-02 10:05:33 -05:00
Tyler Goodlet 999d3efdd7 Another `int` required 2022-02-07 09:36:07 -05:00
Tyler Goodlet f63a7c497d Latest `PyQt5` expects `ints` for widget sizings 2022-02-07 09:36:07 -05:00
Tyler Goodlet 50713030f8 annoying doc strings 2022-01-25 07:57:01 -05:00
Tyler Goodlet 61331fee67 Drop order status bar down a font px size 2022-01-25 07:49:46 -05:00
Tyler Goodlet 1f1f0d3909 Force min pnl label width to avoid resizes on magnitude steps 2021-11-05 10:05:11 -04:00
Tyler Goodlet d7cfe4dcb3 Shorten edit name, passthrough kwargs to adder methods 2021-11-05 10:05:11 -04:00
Tyler Goodlet 3e25be6321 Build out feed status label, add to top of sidepane 2021-09-21 15:48:40 -04:00
Tyler Goodlet 9e41dfb735 Add an icon setter api to `Selection` 2021-09-14 12:25:30 -04:00
Tyler Goodlet 75e1bf3f6e Factor combobox logic into a new `Selection` subtype 2021-09-14 10:34:36 -04:00
Tyler Goodlet 3de4b9afbb Scale down icons size, add RHS icons theory code 2021-09-13 17:39:19 -04:00
Tyler Goodlet d08886dceb Try to set icons on RHS, store combo box entries in map 2021-09-13 08:47:06 -04:00
Tyler Goodlet 46d3bf0484 Drop commented assert about `form.model` 2021-09-10 11:34:29 -04:00
Tyler Goodlet 15025d6047 Move config module to top level 2021-09-06 21:26:28 -04:00
Tyler Goodlet 37719efe37 Scale status bar labels to actual bar height 2021-09-06 09:28:11 -04:00
Tyler Goodlet 171832cfb8 Tweak account label 2021-09-06 09:28:11 -04:00
Tyler Goodlet 9c4437b179 Scale pp pane to chart height
Acts as a fix for lodpi and better sizing logic for the pp status bar.
Drop all the redundant passing of the form to its child layouts during
instantiating (since they're all added as layouts to the tree). Comment
out the feed status label for now since it's not hooked up to the
backend and we'll get it going in a new PR.

Down the road we probably want to do all the pp pane component-widget
sizing *after* the `pyqtgraph` chart is up; it's going to take some
reworking of the charting api tho.
2021-09-06 09:28:11 -04:00
Tyler Goodlet a0c03a8b6b Format pnl label with % type 2021-09-06 09:28:10 -04:00
Tyler Goodlet f90be981b0 Form font size must be set before adding widgets 2021-09-06 09:28:10 -04:00
Tyler Goodlet 8c7e4c0ce9 Add real-time pnl calc and display in status pane 2021-09-06 09:28:10 -04:00
Tyler Goodlet 942cbc2743 `x:` seems clean enough for a "step symbol" 2021-09-06 09:28:10 -04:00
Tyler Goodlet 5b923ae577 Update status UI in `.on_ui_settings_change()`
Use this method to go through writing all allocator parameters and then
reading all changes back into the order mode pane including updating the
limit and step labels by the fill bar.

Machinery changes:
- add `.limit()` and `.step_sizes()` methods to the allocator to
  provide the appropriate data depending on the pp limit size unit (eg.
  currency vs. units)
- humanize the label display text such that you have nice suffixes and
  a fixed precision
- tweak the fill bar labels to be simpler since the values are now
  humanized
- expect `.on_ui_settings_change()` to be called for every slots hotkey
  tweak
2021-09-06 09:28:10 -04:00
Tyler Goodlet c4add92422 Move widget-style "format label" to our label mod
Might as well group similar components..
Drop form widget user input update logic, instead expect caller to
provide an async handler.
2021-09-06 09:28:10 -04:00
Tyler Goodlet 80b01ed8cf Create a formattable label, increase fill bar label sizes 2021-09-06 09:28:10 -04:00
Tyler Goodlet 206af0d575 Port to order pane apis 2021-09-06 09:28:10 -04:00
Tyler Goodlet 58afe07a88 Move `Allocator` to module level, `OrderPane` over to pp mod 2021-09-06 09:28:10 -04:00
Tyler Goodlet be956c4031 Move fill status bar to module level, draft out order pane composite 2021-09-06 09:28:10 -04:00
Tyler Goodlet 7192264818 Position pane UI improvements
- pass label text and field widget key separately
- fix fill status bar slot sizing logic (once and for all) and
  create a new type that allows generating / resizing the bar's
  size / values with a `.set_slots()` method
- pull account names from allocator attr
- set `.fill_bar` as the fill status bar on the form for now
2021-09-06 09:28:10 -04:00
Tyler Goodlet f2376f90ad Support "next to be focussed" args to async form handlers 2021-09-06 09:28:10 -04:00
Tyler Goodlet cebfe9dca3 Split up form creation and input handling, require a `.model` 2021-09-06 09:28:10 -04:00
Tyler Goodlet 1d7300577e Drop godwidget ref to `FieldsForm` 2021-09-06 09:28:10 -04:00
Tyler Goodlet 5528e80c22 Basic allocator state updates from pp sidepane 2021-09-06 09:28:10 -04:00
Tyler Goodlet deedcb2c4a Flip to view mode on field exit key combos 2021-09-06 09:28:10 -04:00
Tyler Goodlet 75f50f4b7e "bracket"-ify fills bar + labels and try to evenly space the pane sections 2021-09-06 09:28:10 -04:00
Tyler Goodlet 3e237124ec Break health bar and pane layout into separate routines 2021-09-06 09:28:10 -04:00
Tyler Goodlet e005c8b345 Use `QFormLayout` instead of rolling our own; add pp and feed status sections 2021-09-06 09:28:10 -04:00
Tyler Goodlet 0ffbb15bc7 Add a "health bar" factor B) 2021-09-06 09:28:10 -04:00
Tyler Goodlet 65158b8c64 Add position status (health) bar math for sizing and styling 2021-09-06 09:28:10 -04:00
Tyler Goodlet 0ce356f5d9 Make field form a vertical layout, add formatted style sheets 2021-09-06 09:28:10 -04:00
Tyler Goodlet d022a105bb Start using a small schema for generating forms 2021-09-06 09:28:10 -04:00
Tyler Goodlet 011f36fc3c WIP add input handler for each widget in the form 2021-09-06 09:28:10 -04:00
Tyler Goodlet 5ec00ee762 Size view delegate from monkey patched parent 2021-09-06 09:28:10 -04:00
Tyler Goodlet 940aafe1be OMG Qt view item sizing is sooo dumb.. 2021-09-06 09:28:10 -04:00
Tyler Goodlet c18cf4f0bf Mock up initial selection field and progress bar 2021-09-06 09:28:10 -04:00
Tyler Goodlet 7e2e316cbf "Forms" is a better module name 2021-09-06 09:28:10 -04:00