Skip to content

Databrowser timepicker - #75

Open
JulReinhardt wants to merge 14 commits into
masterfrom
databrowser_timepicker
Open

Databrowser timepicker#75
JulReinhardt wants to merge 14 commits into
masterfrom
databrowser_timepicker

Conversation

@JulReinhardt

Copy link
Copy Markdown

I added 4 QRadiobuttons to the search_input_widget to quickly select time ranges for the catalog search. I used QTDesigner for the actual layout. The .ui files were converted to .py and then I import the classes into gui/bluesky/search.py

Comment thread ui/catalog_selection.ui Outdated
@ronpandolfi

Copy link
Copy Markdown
Contributor

Can we eliminate the .ui files and clean up the ui_*.py's?

@JulReinhardt

Copy link
Copy Markdown
Author

Can we eliminate the .ui files and clean up the ui_*.py's?
We could, but I thought in case someone wants to quickly changes things visually the .ui files come handy as can be used in QtDesigner. But I will clean up the treeview.ui/.py that indeed sneaked in there.

delete treeview test files, that were accidentally commited
@ronpandolfi

ronpandolfi commented Apr 7, 2020

Copy link
Copy Markdown
Contributor

As discussed, this PR needs:

  • Remove all .ui files
  • Remove auto-generated .py files
  • Write ui components in PyQt, without use of Designer
  • Remove unused imports

@JulReinhardt

Copy link
Copy Markdown
Author

As discussed, this PR needs:

* [ ]  Remove all .ui files

* [ ]  Remove auto-generated .py files

* [ ]  Write ui components in PyQt, without use of Designer

We did not discuss.
What is the future strategy for building GUI in Xi-CAM?

@ronpandolfi

ronpandolfi commented Apr 13, 2020

Copy link
Copy Markdown
Contributor

There's a conflict between the selection of the time range from the radio buttons and the datetime box. Changing the datetime range to a custom value doesn't update the radio buttons. I think the UI can also be made more concise by changing the radiobuttons to QComboBox with options "All", "30 Days", "Today", "Last Hour", and "Custom...". Then we only need to show the datetime range UI when "Custom..." is selected.

  • Change QRadioButton's to a single QComboBox
  • Hide/show datetime range boxes based on QComboBox selection

@JulReinhardt

Copy link
Copy Markdown
Author

Fix: Radio buttons are now reset, when custom datetime range is selected.
I like the idea of showing the QDateTimeEdit when selecting custom, on the other hand using a dropdown instead of buttons means slightly more clicking, whereas the buttons are the quickest way to select. In contrast to other cases eg. stream selector that depend on the data, we know what options to show here.
Should we add a "custom" radio button that opens up the QDateTimeEdit?

@ronpandolfi

ronpandolfi commented Apr 17, 2020

Copy link
Copy Markdown
Contributor

I can't easily confirm, but I think I see a flaw. I suspect that newly generated runs won't be shown when the standard time span modes are used, since it gets time.time() when the mode is selected, not during each update. I'm going to attempt refactoring.
Edit: Also, the start of the range wouldn't slide

@JulReinhardt

Copy link
Copy Markdown
Author

Yes, it would be a flaw if new runs don't show up, due of the time span not being adapted. I can have a look into that. How would it be any different for using QComboBox dropdown instead of Radiobuttons, that should not make a difference?

@danielballan

Copy link
Copy Markdown
Contributor

This work was revisited in bluesky/bluesky-widgets#13, now merged. Safe to close this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants