From f070f9a984daca2e9b147432f9368ab7711e498d Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Tue, 6 Sep 2022 14:23:39 -0400 Subject: [PATCH] Add "active cursor" api to god widget --- piker/ui/_chart.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/piker/ui/_chart.py b/piker/ui/_chart.py index c14ccadd..f7d7a9df 100644 --- a/piker/ui/_chart.py +++ b/piker/ui/_chart.py @@ -118,6 +118,7 @@ class GodWidget(QWidget): self.hist_linked: Optional[LinkedSplits] = None self.rt_linked: Optional[LinkedSplits] = None + self._active_cursor: Optional[Cursor] = None # assigned in the startup func `_async_main()` self._root_n: trio.Nursery = None @@ -306,6 +307,12 @@ class GodWidget(QWidget): self._resizing = False + def get_cursor(self) -> Cursor: + c = self._active_cursor + assert c + return c + + class ChartnPane(QFrame): '''