Rework slider - #55
Open
JoeZiminski wants to merge 10 commits into
Open
Conversation
JoeZiminski
force-pushed
the
rework-slider
branch
from
July 30, 2026 11:47
06672db to
4b3a4c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(branched from #54, requires that to be merged before this)
Currently, the slider value is based on the window chunk size. For larger window sizes, this can create strange behaviour e.g. a 5s window on a 25s recording means there are only 5 valid values on the slider.
This PR reconfigures how the slider works by breaking it up into
2**31-1values, as Qt has anint32cutoff on the C++ side. Given these values, the corresponding sample number is mapped through simple scalinground(slider value / slider max-value * num_samples)There is now a new limit on how far the slider can be moved to the right - it will stop when it is 1-window size away from the end.
Currently, the slider position sets the first value of the window, but the lineedit sets the centre-value. Is it worth aligning these so the input time to the lineedit sets the first value of the window, rather than the centre? I don't feel strongly on this, though it creates one confusing behaviour that when the slider moves the lineedit indicates the first sample of the window. but if 'enter' is pressed on the lineedit, it then jumps such that the value is the centre value of the window.