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

Color range slider code needs to change #1944

Closed
rozyczko opened this issue Oct 29, 2021 · 3 comments · Fixed by #2335
Closed

Color range slider code needs to change #1944

rozyczko opened this issue Oct 29, 2021 · 3 comments · Fixed by #2335
Assignees
Labels
Blocker Prevents a different issue from being resolved Major Big change in the code or important change in behaviour
Milestone

Comments

@rozyczko
Copy link
Member

src\sas\qtgui\Plotting\rangeSlider.py is an external piece of code and it is GPL-2 licensed.
We strive to be BSD compliant so we can't ship this file. It got implemented back in 2017 as a temporary solution to the problem but reworking it properly has been, of course, forgotten.
Cursory check of similar functionality yields some interesting replacements, e.g.
https://pythonrepo.com/repo/tlambert03-QtRangeSlider-python-graphical-user-interface-applications
and
https://stackoverflow.com/questions/47342158/porting-range-slider-widget-to-pyqt5

This issue should probably be prioritized pretty high.

@rozyczko rozyczko added the Major Big change in the code or important change in behaviour label Oct 29, 2021
@butlerpd
Copy link
Member

So there are choices. And I assume we could subclass the normal single Qtslider and add a second slider to it if we really wanted to do work 😄

I note however that the first solution (the QtRangeSlider) looks like it will suffer the same problem that @dehoni has encountered: it is integer steps only (unless I miss read that). That said, I think that the sliders probably should be integers given they are generic. What we probably need is a new ticket to fix that slider. I think the proper fix would be to add code when using the slider that multiplies and/or divides the range we have so that it always has roughly 100 integer steps for the slider? That way regardless of the size of the range there are a reasonable number of steps?

@butlerpd butlerpd added this to the SasView 5.0.5 milestone Oct 30, 2021
@butlerpd butlerpd added the Blocker Prevents a different issue from being resolved label Oct 30, 2021
@butlerpd
Copy link
Member

adding this blocker for now so we don't forget?

@butlerpd butlerpd modified the milestones: SasView 5.0.5, SasView 5.1.0 Feb 1, 2022
@rozyczko rozyczko self-assigned this Jun 9, 2022
@wpotrzebowski
Copy link
Contributor

@rozyczko: is this https://pypi.org/project/QtRangeSlider/ any useful?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocker Prevents a different issue from being resolved Major Big change in the code or important change in behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants