Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main' into useq_hcs_wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
fdrgsp committed Jul 12, 2024
2 parents 70885a8 + 426baf2 commit fd2c324
Show file tree
Hide file tree
Showing 5 changed files with 540 additions and 1 deletion.
22 changes: 22 additions & 0 deletions examples/well_plate_widget.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
from contextlib import suppress

import useq
from qtpy.QtWidgets import QApplication

from pymmcore_widgets.useq_widgets import WellPlateWidget

with suppress(ImportError):
from rich import print


app = QApplication([])

plan = useq.WellPlatePlan(
plate="24-well", a1_center_xy=(0, 0), selected_wells=slice(0, 8, 2)
)

ps = WellPlateWidget(plan)
ps.valueChanged.connect(print)
ps.show()

app.exec()
2 changes: 1 addition & 1 deletion src/pymmcore_widgets/_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ def __init__(self, scene: QGraphicsScene, parent: QWidget | None = None) -> None
super().__init__(scene, parent)
self.padding = 0.05 # fraction of the bounding rect

def resizeEvent(self, event: QResizeEvent) -> None:
def resizeEvent(self, event: QResizeEvent | None) -> None:
if not (scene := self.scene()):
return
rect = scene.itemsBoundingRect()
Expand Down
2 changes: 2 additions & 0 deletions src/pymmcore_widgets/useq_widgets/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from ._mda_sequence import PYMMCW_METADATA_KEY, MDASequenceWidget
from ._positions import PositionTable
from ._time import TimePlanWidget
from ._well_plate_widget import WellPlateWidget
from ._z import ZPlanWidget
from .points_plans import PointsPlanWidget

Expand All @@ -33,5 +34,6 @@
"TextColumn",
"TimeDeltaColumn",
"TimePlanWidget",
"WellPlateWidget",
"ZPlanWidget",
]
Loading

0 comments on commit fd2c324

Please sign in to comment.