Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Databrowser timepicker #75

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open

Databrowser timepicker #75

wants to merge 14 commits into from

Conversation

JulReinhardt
Copy link

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

@ronpandolfi
Copy link
Contributor

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

@JulReinhardt
Copy link
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
Copy link
Contributor

ronpandolfi commented Apr 7, 2020

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
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
Copy link
Contributor

ronpandolfi commented Apr 13, 2020

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
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
Copy link
Contributor

ronpandolfi commented Apr 17, 2020

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
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
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