-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
MNT: Migrate VTK Widgets to GUI API #8862
Conversation
The previous interface relies on sliders heavily but I forgot that |
Don't use sliders in Qt, use QDoubleSpinBox es |
(for time you probably do want a silder -- I would actually oversample the |
That's the easy way out of this for sure 😁 |
In the previous interface, each renderer had an orientation widget. On the sketch, there is only one widget for that. The simple solution is to duplicate those. A complicated one would be to command the click on a renderer to update the widget. |
How about a SpinBox representing the raveled plotter number to control? Then at a later date we can connect some on_click action to update this SpinBox with whichever one was clicked, then you have interactive mouse-based control and direct indexing control. |
This works too! |
Once the case of the time widget is closed, I think it will be a good time to double-check the UI/UX and fix the (hopefully) minor details. Then I'll move on to test/coverage. I'm wondering how And finally same treatment for the |
It's now ready for UI/UX reviews! Meanwhile I'll work on fixing the tests. |
@GuillaumeFavelier sizing issue should be fixed, take a look at the code and The sizing fix was QScrollArea + |
screenshot now only takes a copy of the brain (no time series).
I am saying why not but is it a conscious choice?
for the me the scale control for clim does not behave smoothly.
I can show you by sharing my screening my screen on monday
… |
This behavior should change depending on whether you do |
using this code
|
How do you take the screenshot @agramfort ? |
I pushed a commit to fix:
|
I admit this separation is simpler 🏹 and I like |
Locally by using
Reproduced in https://github.com/mne-tools/mne-python/runs/1989903394#step:13:3644 for example |
I pushed a commit to fix the screenshot taken from the interface. I'm surprised it was not reported sooner. |
Sorry 😢 |
* upstream/main: Fix (mne-tools#8971)
This is because we toggle the interface off earlier in the test, which makes the 3D area take up the entire window width, which I'd consider expected behavior (though in the future we could consider shrinking the window). Toggling the interface back on before doing the screenshot fixes it locally, will push a fix. |
I pushed a commit to fix |
Okay, let's get this in and iterate further on the interface as necessary. Thanks a ton @GuillaumeFavelier , this is great! |
@GuillaumeFavelier You're a wizard 🧙🏻♂️ Thank you! |
* upstream/main: MAINT: Skip matplotlib pre for now (mne-tools#8973) FIX: Brain lights (mne-tools#8972) MNT: Migrate VTK Widgets (mne-tools#8862) Fix (mne-tools#8971) Fix indexing dipoles read from a bdip file (mne-tools#8963)
* upstream/main: MAINT: Skip matplotlib pre for now (mne-tools#8973) FIX: Brain lights (mne-tools#8972) MNT: Migrate VTK Widgets (mne-tools#8862) Fix (mne-tools#8971)
* upstream/main: MAINT: Skip matplotlib pre for now (mne-tools#8973) FIX: Brain lights (mne-tools#8972) MNT: Migrate VTK Widgets (mne-tools#8862) Fix (mne-tools#8971) Fix indexing dipoles read from a bdip file (mne-tools#8963)
This PR moves the VTK widgets into a dedicated Qt interface for the standalone solution and into Jupyter Widgets for notebooks.
Here is the latest sketch (it may change during development):
For the approach I chose, I'll just build the dock and move one widget at a time. So both old and new ways will live in parallel for a while. I expect working on refactoring and coverage at end. For now, it's a work in progress.
It's an item of #7162