forked from pymmcore-plus/pymmcore-widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
131 lines (121 loc) · 3.37 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
"""A set of widgets for the pymmcore-plus module."""
import warnings
from importlib.metadata import PackageNotFoundError, version
from typing import TYPE_CHECKING
try:
__version__ = version("pymmcore-widgets")
except PackageNotFoundError:
__version__ = "uninstalled"
__all__ = [
"CameraRoiWidget",
"ChannelGroupWidget",
"ChannelTable",
"ChannelWidget",
"ConfigurationWidget",
"ConfigWizard",
"DefaultCameraExposureWidget",
"DeviceWidget",
"ExposureWidget",
"GridPlanWidget",
"GroupPresetDialog",
"GroupPresetTableWidget",
"HCSWizard",
"ImagePreview",
"InstallWidget",
"LiveButton",
"MDAWidget",
"MDASequenceWidget",
"ObjectivesWidget",
"ObjectivesPixelConfigurationWidget",
"PixelConfigurationWidget",
"PositionTable",
"PresetsWidget",
"PropertiesWidget",
"PropertyBrowser",
"PropertyWidget",
"ShuttersWidget",
"SnapButton",
"StageWidget",
"StateDeviceWidget",
"TimePlanWidget",
"ZPlanWidget",
]
from ._install_widget import InstallWidget
from .config_presets import (
GroupPresetTableWidget,
ObjectivesPixelConfigurationWidget,
PixelConfigurationWidget,
)
from .control import (
CameraRoiWidget,
ChannelGroupWidget,
ChannelWidget,
ConfigurationWidget,
DefaultCameraExposureWidget,
ExposureWidget,
LiveButton,
ObjectivesWidget,
PresetsWidget,
ShuttersWidget,
SnapButton,
StageWidget,
)
from .device_properties import PropertiesWidget, PropertyBrowser, PropertyWidget
from .group_preset_widget import GroupPresetDialog
from .hcs import HCSWizard
from .hcwizard import ConfigWizard
from .mda import MDAWidget
from .useq_widgets import (
ChannelTable,
GridPlanWidget,
MDASequenceWidget,
PositionTable,
TimePlanWidget,
ZPlanWidget,
)
from .views import ImagePreview
if TYPE_CHECKING:
from ._deprecated._device_widget import ( # noqa: TCH004
DeviceWidget,
StateDeviceWidget,
)
def __getattr__(name: str) -> object:
if name == "DeviceWidget":
warnings.warn(
"'DeviceWidget' is deprecated, please seek alternatives.",
DeprecationWarning,
stacklevel=2,
)
from ._deprecated._device_widget import DeviceWidget
return DeviceWidget
if name == "StateDeviceWidget":
warnings.warn(
"'StateDeviceWidget' is deprecated, please seek alternatives.",
DeprecationWarning,
stacklevel=2,
)
from ._deprecated._device_widget import StateDeviceWidget
return StateDeviceWidget
if name == "ZStackWidget":
warnings.warn(
"'ZStackWidget' is deprecated, using 'ZPlanWidget' instead.",
DeprecationWarning,
stacklevel=2,
)
return ZPlanWidget
if name == "GridWidget":
warnings.warn(
"'GridWidget' is deprecated, using 'GridPlanWidget' instead.",
DeprecationWarning,
stacklevel=2,
)
return GridPlanWidget
if name == "PixelSizeWidget":
warnings.warn(
"PixelSizeWidget is deprecated, "
"using ObjectivesPixelConfigurationWidget instead.",
DeprecationWarning,
stacklevel=2,
)
return ObjectivesPixelConfigurationWidget
raise AttributeError(f"module {__name__} has no attribute {name}")