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

A lightweight UI for medical visualizations #3: Changes to Event Handling #1199

merged 5 commits into from Mar 30, 2017


None yet
4 participants

ranveeraggarwal commented Mar 27, 2017

This PR introduces a new way of handling events. Earlier, the handle_events method was a part of the base UI class and an add_callback method had to be written within each subclass to make handle_events work. This was kind of confusing because,

  1. It restricted all subclasses to have a compulsory override of add_callback
  2. The event handling is not the same for all kinds of UI elements, some elements might have multiple actors, in which case, this gets very confusing

Now, there is just one add_callback function that is a part of the base UI class. handle_events needs to be explicitly called by each subclass. If a subclass has multiple actors, handle events needs to be overridden.

This PR also breaks down the tests into multiple functions so that the events of the previous elements needn't be re-recorded.

This is the third PR to complete #1111 and continues from #1183.


This comment has been minimized.

codecov-io commented Mar 27, 2017

Codecov Report

Merging #1199 into master will decrease coverage by 0.09%.
The diff coverage is 83.33%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #1199     +/-   ##
- Coverage   85.96%   85.87%   -0.1%     
  Files         221      221             
  Lines       27066    27116     +50     
  Branches     2769     2776      +7     
+ Hits        23267    23285     +18     
- Misses       3122     3148     +26     
- Partials      677      683      +6
Impacted Files Coverage Δ
dipy/viz/ 89.21% <100%> (-3.9%) ⬇️
dipy/viz/tests/ 87.57% <80.24%> (-6.23%) ⬇️
dipy/viz/ 96.75% <0%> (-0.65%) ⬇️
dipy/reconst/ 86.64% <0%> (-0.2%) ⬇️
dipy/reconst/tests/ 98.92% <0%> (+0.01%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 98c472a...4569b02. Read the comment docs.

@ranveeraggarwal ranveeraggarwal changed the title from [WIP] A lightweight UI for medical visualizations #3: Changes to Event Handling to A lightweight UI for medical visualizations #3: Changes to Event Handling Mar 28, 2017

MarcCote and others added some commits Mar 29, 2017


This comment has been minimized.

coveralls commented Mar 29, 2017

Coverage Status

Coverage decreased (-0.07%) to 88.381% when pulling 4569b02 on ranveeraggarwal:ui into 98c472a on nipy:master.


This look good to me. I'll merge it at the end of the day unless @Garyfallidis you want to have a closer look first?

@MarcCote MarcCote merged commit b201a0a into nipy:master Mar 30, 2017

1 of 4 checks passed

codecov/patch 83.33% of diff hit (target 85.96%)
codecov/project 85.87% (-0.1%) compared to 98c472a
coverage/coveralls Coverage decreased (-0.07%) to 88.381%
continuous-integration/travis-ci/pr The Travis CI build passed

This comment has been minimized.


MarcCote commented Mar 30, 2017

@ranveeraggarwal: on to the line slider :)

ShreyasFadnavis pushed a commit to ShreyasFadnavis/dipy that referenced this pull request Sep 20, 2018

Merge pull request nipy#1199 from ranveeraggarwal/ui
A lightweight UI for medical visualizations nipy#3: Changes to Event Handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment