Skip to content

TimePlanWidget

TimePlanWidget widget

This image generated from example code below.

TimePlanWidget #

Bases: DataTableWidget

Table to edit a useq.TimePlan.

setValue(value: Any) -> None #

Set the current value of the table from a useq.TimePlan.

Parameters:

Name Type Description Default
value MultiPhaseTimePlan | TIntervalLoops | TDurationLoops | TIntervalDuration | None

The useq.TimePlan to set.

required

value(exclude_unchecked: bool = True) -> MultiPhaseTimePlan | TIntervalLoops | TIntervalDuration #

Return the current value of the table as a useq.TimePlan.

Returns:

Type Description
MultiPhaseTimePlan | TIntervalLoops | TIntervalDuration

The current useq.TimePlan value of the table.

Example#

time_plan_widget.py
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
"""Example usage of the TimePlanWidget class.

Check also the 'mda_widget.py' example to see the TimePlanWidget
used in combination of other widgets.
"""

import useq
from pymmcore_plus import CMMCorePlus
from qtpy.QtWidgets import QApplication

from pymmcore_widgets import TimePlanWidget

app = QApplication([])

mmc = CMMCorePlus().instance()
mmc.loadSystemConfiguration()

t_wdg = TimePlanWidget()
t_wdg.setValue(useq.TIntervalLoops(interval=3, loops=5))
t_wdg.show()

app.exec_()