Skip to content

Conversation

@GuillaumeFavelier
Copy link
Contributor

This small PR allows setting the Qt dialog box icon (instead of using only ⚠️ ). The default remains 'Warning' though.

It's part of #10565

@GuillaumeFavelier GuillaumeFavelier self-assigned this Apr 27, 2022
@GuillaumeFavelier GuillaumeFavelier changed the title MNT: dialog box MNT: dialog box icon Apr 27, 2022
@GuillaumeFavelier
Copy link
Contributor Author

GuillaumeFavelier commented Apr 27, 2022

Assuming the CIs return green, this is ready to go from my end @agramfort, @larsoner

EDIT: Here is a small code snippet to test:

Details
from mne.viz.backends.renderer import _get_renderer

renderer = _get_renderer()
dialog = renderer._dialog_create(
    title="foo",
    text="bar",
    info_text="foobar",
    callback=lambda x: print('barfoo'),
    icon='Information',  # <---- new parameter here
    buttons=["Ok"],
    modal=True,
)
dialog.show()
renderer.show()

@larsoner larsoner merged commit 42102b5 into mne-tools:main Apr 27, 2022
@larsoner
Copy link
Member

Thanks @GuillaumeFavelier !

larsoner added a commit to larsoner/mne-python that referenced this pull request Apr 27, 2022
* upstream/main:
  MNT: dock area (mne-tools#10575)
  MNT: dialog box icon (mne-tools#10573)
  ENH: Add head_source option (mne-tools#10569)
  fix for broken subjdir (mne-tools#10574)
  MAINT: Add export functions to env (mne-tools#10563)
  Add support for BrainVision ahdr/amrk format, as produced by the V-AMP (mne-tools#10515)
@GuillaumeFavelier GuillaumeFavelier deleted the mnt/dialog branch April 27, 2022 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants