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

Add a helper to link widgets related to setting limits #872

Merged
merged 11 commits into from
Mar 18, 2016

Conversation

astrofrog
Copy link
Member

For a number of widgets, we need to implement the logic of caching attribute limits for different data attributes, linking an autoscaling option to the limits, flipping the limits, etc. This PR adds a helper class to manage this in one place.

This is an alternative to #871 - the advantage of the helper class is that it does not impose any particular layout (whereas the layout in #871 did not always fit in to particular widgets). It also allows some of the things, such as the scale mode and flip button, to be optional.

An example of using this is in glue-viz/glue-vispy-viewers#83 - in particular, note that the Python files there are significantly simplified.

The helper here can also be used inside Glue core in various places, such as the image layer artist editor, or histogram limits for instance.

@astrofrog
Copy link
Member Author

@ChrisBeaumont - if you have a chance to take a look at this in the next couple of days, it would be great to have your feedback about this approach. Essentially the general question is how to link sets of widgets together via some logic - another common case would be a QSlider + QLineEdit, which could benefit from a similar class.

astrofrog added a commit that referenced this pull request Mar 18, 2016
Add a helper to link widgets related to setting limits
@astrofrog astrofrog merged commit 4112124 into glue-viz:master Mar 18, 2016
@astrofrog astrofrog added this to the 0.8.0 milestone May 3, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants