pymmcore-plus / napari-micromanager

GUI interface between napari and micromanager powered by pymmcore-plus and pymmcore-widgets
https://pymmcore-plus.github.io/napari-micromanager/
BSD 3-Clause "New" or "Revised" License
61 stars 21 forks source link

feat: replace menu with QToolBar #221

Closed fdrgsp closed 1 year ago

fdrgsp commented 1 year ago

This PR replaces the menu with a QToolBar.

Some of the pymmcore-widgets are now directly added to the QToolBar, other can be called with QPushButtons added to the toolbar.

The creation of the QToolBar and all the QPushButtons/pymmcore-widgets connections have been moved from main_window.py to a single file called _toolbar.py.


Screen Shot 2022-12-04 at 12 08 08 AM
codecov[bot] commented 1 year ago

Codecov Report

Base: 82.27% // Head: 83.02% // Increases project coverage by +0.75% :tada:

Coverage data is based on head (3890b48) compared to base (ce156cd). Patch coverage: 95.85% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #221 +/- ## ========================================== + Coverage 82.27% 83.02% +0.75% ========================================== Files 13 13 Lines 880 984 +104 ========================================== + Hits 724 817 +93 - Misses 156 167 +11 ``` | [Impacted Files](https://codecov.io/gh/pymmcore-plus/napari-micromanager/pull/221?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus) | Coverage Δ | | |---|---|---| | [src/napari\_micromanager/\_\_main\_\_.py](https://codecov.io/gh/pymmcore-plus/napari-micromanager/pull/221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL25hcGFyaV9taWNyb21hbmFnZXIvX19tYWluX18ucHk=) | `0.00% <0.00%> (ø)` | | | [src/napari\_micromanager/\_gui\_objects/\_toolbar.py](https://codecov.io/gh/pymmcore-plus/napari-micromanager/pull/221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL25hcGFyaV9taWNyb21hbmFnZXIvX2d1aV9vYmplY3RzL190b29sYmFyLnB5) | `96.25% <96.25%> (ø)` | | | [src/napari\_micromanager/main\_window.py](https://codecov.io/gh/pymmcore-plus/napari-micromanager/pull/221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL25hcGFyaV9taWNyb21hbmFnZXIvbWFpbl93aW5kb3cucHk=) | `87.45% <100.00%> (+0.19%)` | :arrow_up: | | [...ari\_micromanager/\_gui\_objects/\_snap\_live\_widget.py](https://codecov.io/gh/pymmcore-plus/napari-micromanager/pull/221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL25hcGFyaV9taWNyb21hbmFnZXIvX2d1aV9vYmplY3RzL19zbmFwX2xpdmVfd2lkZ2V0LnB5) | `0.00% <0.00%> (-100.00%)` | :arrow_down: | | [...pari\_micromanager/\_gui\_objects/\_shutters\_widget.py](https://codecov.io/gh/pymmcore-plus/napari-micromanager/pull/221/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus#diff-c3JjL25hcGFyaV9taWNyb21hbmFnZXIvX2d1aV9vYmplY3RzL19zaHV0dGVyc193aWRnZXQucHk=) | `100.00% <0.00%> (+100.00%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=pymmcore-plus)

:umbrella: View full report at Codecov.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

tlambert03 commented 1 year ago

@fdrgsp ... it seems like you saw https://github.com/fdrgsp/napari-micromanager/pull/33 ... but didn't merge it. how come?

tlambert03 commented 1 year ago

can you change all of those strings to MDI6.___ and remove the getattr call, as in my PR?

fdrgsp commented 1 year ago

@fdrgsp ... it seems like you saw fdrgsp#33 ... but didn't merge it. how come?

I looked at it on the phone and deleted the email and I didn't find it anymore :joy: I thought you added it in this PR and did't realize it was on mine, sorry

fdrgsp commented 1 year ago

@tlambert03 do you like that when we add the widgets they are already docked? What about docking only the mda and explorer and leave the other undocked when created?

tlambert03 commented 1 year ago

yeah, I do like it, for everything but the property browser... but lets handle special casing in a followup pr

fdrgsp commented 1 year ago

good stuff. i'm inclined to merge as is, and then do some refactoring later today. sound good?

sounds great!!!