pymodaq 5.1.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pymodaq/__init__.py +98 -0
- pymodaq/control_modules/__init__.py +1 -0
- pymodaq/control_modules/daq_move.py +1238 -0
- pymodaq/control_modules/daq_move_ui/__init__.py +0 -0
- pymodaq/control_modules/daq_move_ui/factory.py +48 -0
- pymodaq/control_modules/daq_move_ui/ui_base.py +359 -0
- pymodaq/control_modules/daq_move_ui/uis/__init__.py +0 -0
- pymodaq/control_modules/daq_move_ui/uis/binary.py +139 -0
- pymodaq/control_modules/daq_move_ui/uis/original.py +120 -0
- pymodaq/control_modules/daq_move_ui/uis/relative.py +124 -0
- pymodaq/control_modules/daq_move_ui/uis/simple.py +126 -0
- pymodaq/control_modules/daq_viewer.py +1517 -0
- pymodaq/control_modules/daq_viewer_ui.py +407 -0
- pymodaq/control_modules/mocks.py +57 -0
- pymodaq/control_modules/move_utility_classes.py +1141 -0
- pymodaq/control_modules/thread_commands.py +137 -0
- pymodaq/control_modules/ui_utils.py +72 -0
- pymodaq/control_modules/utils.py +591 -0
- pymodaq/control_modules/viewer_utility_classes.py +670 -0
- pymodaq/daq_utils/__init__.py +0 -0
- pymodaq/daq_utils/daq_utils.py +6 -0
- pymodaq/dashboard.py +2396 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_Client.aliases +3 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_Client.lvlps +3 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_Client.lvproj +32 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_Client.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_Server_1Dgaussian.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_Server_2Dgaussian.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_read_cmd.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_read_float.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_read_int.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_send_data.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_send_int.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_send_scalar.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/DAQ_TCP_send_string.vi +0 -0
- pymodaq/examples/Labview_TCP_Client/client_state.ctl +0 -0
- pymodaq/examples/Labview_TCP_Client/cmd_types.ctl +0 -0
- pymodaq/examples/__init__.py +0 -0
- pymodaq/examples/function_plotter.py +160 -0
- pymodaq/examples/nonlinearscanner.py +126 -0
- pymodaq/examples/qt_less_standalone_module.py +165 -0
- pymodaq/examples/tcp_client.py +97 -0
- pymodaq/extensions/__init__.py +25 -0
- pymodaq/extensions/adaptive/__init__.py +2 -0
- pymodaq/extensions/adaptive/adaptive_optimization.py +179 -0
- pymodaq/extensions/adaptive/loss_function/_1d_loss_functions.py +73 -0
- pymodaq/extensions/adaptive/loss_function/_2d_loss_functions.py +73 -0
- pymodaq/extensions/adaptive/loss_function/__init__.py +3 -0
- pymodaq/extensions/adaptive/loss_function/loss_factory.py +110 -0
- pymodaq/extensions/adaptive/utils.py +123 -0
- pymodaq/extensions/bayesian/__init__.py +2 -0
- pymodaq/extensions/bayesian/acquisition/__init__.py +2 -0
- pymodaq/extensions/bayesian/acquisition/acquisition_function_factory.py +80 -0
- pymodaq/extensions/bayesian/acquisition/base_acquisition_function.py +105 -0
- pymodaq/extensions/bayesian/bayesian_optimization.py +143 -0
- pymodaq/extensions/bayesian/utils.py +180 -0
- pymodaq/extensions/console.py +73 -0
- pymodaq/extensions/daq_logger/__init__.py +1 -0
- pymodaq/extensions/daq_logger/abstract.py +52 -0
- pymodaq/extensions/daq_logger/daq_logger.py +519 -0
- pymodaq/extensions/daq_logger/db/__init__.py +0 -0
- pymodaq/extensions/daq_logger/db/db_logger.py +300 -0
- pymodaq/extensions/daq_logger/db/db_logger_models.py +100 -0
- pymodaq/extensions/daq_logger/h5logging.py +84 -0
- pymodaq/extensions/daq_scan.py +1218 -0
- pymodaq/extensions/daq_scan_ui.py +241 -0
- pymodaq/extensions/data_mixer/__init__.py +0 -0
- pymodaq/extensions/data_mixer/daq_0Dviewer_DataMixer.py +97 -0
- pymodaq/extensions/data_mixer/data_mixer.py +262 -0
- pymodaq/extensions/data_mixer/model.py +108 -0
- pymodaq/extensions/data_mixer/models/__init__.py +0 -0
- pymodaq/extensions/data_mixer/models/equation_model.py +91 -0
- pymodaq/extensions/data_mixer/models/gaussian_fit_model.py +65 -0
- pymodaq/extensions/data_mixer/parser.py +53 -0
- pymodaq/extensions/data_mixer/utils.py +23 -0
- pymodaq/extensions/h5browser.py +9 -0
- pymodaq/extensions/optimizers_base/__init__.py +0 -0
- pymodaq/extensions/optimizers_base/optimizer.py +1016 -0
- pymodaq/extensions/optimizers_base/thread_commands.py +22 -0
- pymodaq/extensions/optimizers_base/utils.py +427 -0
- pymodaq/extensions/pid/__init__.py +16 -0
- pymodaq/extensions/pid/actuator_controller.py +14 -0
- pymodaq/extensions/pid/daq_move_PID.py +154 -0
- pymodaq/extensions/pid/pid_controller.py +1016 -0
- pymodaq/extensions/pid/utils.py +189 -0
- pymodaq/extensions/utils.py +111 -0
- pymodaq/icon.ico +0 -0
- pymodaq/post_treatment/__init__.py +6 -0
- pymodaq/post_treatment/load_and_plot.py +352 -0
- pymodaq/resources/__init__.py +0 -0
- pymodaq/resources/config_template.toml +57 -0
- pymodaq/resources/preset_default.xml +1 -0
- pymodaq/resources/setup_plugin.py +73 -0
- pymodaq/splash.png +0 -0
- pymodaq/utils/__init__.py +0 -0
- pymodaq/utils/array_manipulation.py +6 -0
- pymodaq/utils/calibration_camera.py +180 -0
- pymodaq/utils/chrono_timer.py +203 -0
- pymodaq/utils/config.py +53 -0
- pymodaq/utils/conftests.py +5 -0
- pymodaq/utils/daq_utils.py +158 -0
- pymodaq/utils/data.py +128 -0
- pymodaq/utils/enums.py +6 -0
- pymodaq/utils/exceptions.py +38 -0
- pymodaq/utils/gui_utils/__init__.py +10 -0
- pymodaq/utils/gui_utils/loader_utils.py +75 -0
- pymodaq/utils/gui_utils/utils.py +18 -0
- pymodaq/utils/gui_utils/widgets/lcd.py +8 -0
- pymodaq/utils/h5modules/__init__.py +2 -0
- pymodaq/utils/h5modules/module_saving.py +526 -0
- pymodaq/utils/leco/__init__.py +25 -0
- pymodaq/utils/leco/daq_move_LECODirector.py +217 -0
- pymodaq/utils/leco/daq_xDviewer_LECODirector.py +163 -0
- pymodaq/utils/leco/director_utils.py +74 -0
- pymodaq/utils/leco/leco_director.py +166 -0
- pymodaq/utils/leco/pymodaq_listener.py +364 -0
- pymodaq/utils/leco/rpc_method_definitions.py +43 -0
- pymodaq/utils/leco/utils.py +74 -0
- pymodaq/utils/logger.py +6 -0
- pymodaq/utils/managers/__init__.py +0 -0
- pymodaq/utils/managers/batchscan_manager.py +346 -0
- pymodaq/utils/managers/modules_manager.py +589 -0
- pymodaq/utils/managers/overshoot_manager.py +242 -0
- pymodaq/utils/managers/preset_manager.py +229 -0
- pymodaq/utils/managers/preset_manager_utils.py +262 -0
- pymodaq/utils/managers/remote_manager.py +484 -0
- pymodaq/utils/math_utils.py +6 -0
- pymodaq/utils/messenger.py +6 -0
- pymodaq/utils/parameter/__init__.py +10 -0
- pymodaq/utils/parameter/utils.py +6 -0
- pymodaq/utils/scanner/__init__.py +5 -0
- pymodaq/utils/scanner/scan_config.py +16 -0
- pymodaq/utils/scanner/scan_factory.py +259 -0
- pymodaq/utils/scanner/scan_selector.py +477 -0
- pymodaq/utils/scanner/scanner.py +324 -0
- pymodaq/utils/scanner/scanners/_1d_scanners.py +174 -0
- pymodaq/utils/scanner/scanners/_2d_scanners.py +299 -0
- pymodaq/utils/scanner/scanners/__init__.py +1 -0
- pymodaq/utils/scanner/scanners/sequential.py +224 -0
- pymodaq/utils/scanner/scanners/tabular.py +319 -0
- pymodaq/utils/scanner/utils.py +110 -0
- pymodaq/utils/svg/__init__.py +6 -0
- pymodaq/utils/svg/svg_renderer.py +20 -0
- pymodaq/utils/svg/svg_view.py +35 -0
- pymodaq/utils/svg/svg_viewer2D.py +50 -0
- pymodaq/utils/tcp_ip/__init__.py +6 -0
- pymodaq/utils/tcp_ip/mysocket.py +12 -0
- pymodaq/utils/tcp_ip/serializer.py +13 -0
- pymodaq/utils/tcp_ip/tcp_server_client.py +772 -0
- pymodaq-5.1.6.dist-info/METADATA +238 -0
- pymodaq-5.1.6.dist-info/RECORD +154 -0
- pymodaq-5.1.6.dist-info/WHEEL +4 -0
- pymodaq-5.1.6.dist-info/entry_points.txt +7 -0
- pymodaq-5.1.6.dist-info/licenses/LICENSE +21 -0
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from qtpy.QtWidgets import QVBoxLayout, QToolBar
|
|
4
|
+
from qtpy import QtWidgets
|
|
5
|
+
|
|
6
|
+
from pymodaq.control_modules.daq_move_ui.ui_base import DAQ_Move_UI_Base
|
|
7
|
+
from pymodaq.control_modules.thread_commands import UiToMainMove
|
|
8
|
+
from pymodaq_gui.utils.widgets import LabelWithFont
|
|
9
|
+
from pymodaq_utils.utils import ThreadCommand
|
|
10
|
+
|
|
11
|
+
from pymodaq.control_modules.daq_move_ui.factory import ActuatorUIFactory
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@ActuatorUIFactory.register('Relative')
|
|
15
|
+
class DAQ_Move_UI_Relative(DAQ_Move_UI_Base):
|
|
16
|
+
is_compact = True
|
|
17
|
+
def __init__(self, parent, title="DAQ_Move"):
|
|
18
|
+
|
|
19
|
+
super().__init__(parent, title)
|
|
20
|
+
|
|
21
|
+
def setup_docks(self):
|
|
22
|
+
super().setup_docks()
|
|
23
|
+
|
|
24
|
+
self.parent.setLayout(QVBoxLayout())
|
|
25
|
+
self.parent.layout().setContentsMargins(0, 0, 0, 0)
|
|
26
|
+
|
|
27
|
+
self.move_toolbar = QToolBar()
|
|
28
|
+
self.parent.layout().addWidget(self.move_toolbar)
|
|
29
|
+
|
|
30
|
+
self.current_value_sb.set_font_size(10)
|
|
31
|
+
self.current_value_sb.setMinimumHeight(20)
|
|
32
|
+
self.current_value_sb.setMinimumWidth(80)
|
|
33
|
+
|
|
34
|
+
self.control_widget = QtWidgets.QWidget()
|
|
35
|
+
self.populate_control_ui(self.control_widget)
|
|
36
|
+
|
|
37
|
+
def setup_actions(self):
|
|
38
|
+
self.add_widget('name', LabelWithFont(f'{self.title}', font_name="Tahoma",
|
|
39
|
+
font_size=14, isbold=True, isitalic=True),
|
|
40
|
+
toolbar=self.move_toolbar)
|
|
41
|
+
|
|
42
|
+
self.add_widget('actuators_combo', self.actuators_combo, toolbar=self.move_toolbar)
|
|
43
|
+
self.add_action('ini_actuator', 'Ini. Actuator', 'ini', toolbar=self.move_toolbar)
|
|
44
|
+
self.add_widget('ini_led', self.ini_state_led, toolbar=self.move_toolbar)
|
|
45
|
+
self.move_toolbar.addSeparator()
|
|
46
|
+
self.add_widget('current', self.current_value_sb, toolbar=self.move_toolbar)
|
|
47
|
+
self.add_widget('move_done', self.move_done_led, toolbar=self.move_toolbar)
|
|
48
|
+
self.move_toolbar.addSeparator()
|
|
49
|
+
self.add_widget('rel_move', self.rel_value_sb, toolbar=self.move_toolbar)
|
|
50
|
+
self.add_action('move_rel_plus', 'Set Rel. (+)', 'MoveUp', toolbar=self.move_toolbar)
|
|
51
|
+
self.add_action('move_rel_minus', 'Set Rel. (-)', 'MoveDown', toolbar=self.move_toolbar)
|
|
52
|
+
|
|
53
|
+
self.add_action('stop', 'Stop', 'stop', "Stop Motion", toolbar=self.move_toolbar)
|
|
54
|
+
self.move_toolbar.addSeparator()
|
|
55
|
+
self.add_action('show_settings', 'Show Settings', 'tree', "Show Settings", checkable=True,
|
|
56
|
+
toolbar=self.move_toolbar)
|
|
57
|
+
self.add_action('show_controls', 'Show Controls', 'Add_Step', "Show more controls", checkable=True,
|
|
58
|
+
toolbar=self.move_toolbar)
|
|
59
|
+
self.add_action('show_graph', 'Show Graph', 'graph', "Show Graph", checkable=True,
|
|
60
|
+
toolbar=self.move_toolbar)
|
|
61
|
+
self.add_action('refresh_value', 'Refresh', 'Refresh2', "Refresh Value", checkable=True,
|
|
62
|
+
toolbar=self.move_toolbar)
|
|
63
|
+
self.move_toolbar.addSeparator()
|
|
64
|
+
self.add_action('show_config', 'Show Config', 'Settings', "Show PyMoDAQ Config", checkable=False,
|
|
65
|
+
toolbar=self.move_toolbar)
|
|
66
|
+
self.add_action('quit', 'Quit the module', 'close2', toolbar=self.move_toolbar)
|
|
67
|
+
self.add_action('log', 'Show Log file', 'information2', toolbar=self.move_toolbar)
|
|
68
|
+
self.add_widget('status', self.statusbar, toolbar=self.move_toolbar)
|
|
69
|
+
|
|
70
|
+
def connect_things(self):
|
|
71
|
+
super().connect_things()
|
|
72
|
+
|
|
73
|
+
self.connect_action('move_rel_plus', lambda: self.emit_move_rel('+'))
|
|
74
|
+
self.connect_action('move_rel_minus', lambda: self.emit_move_rel('-'))
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
def main(init_qt=True):
|
|
78
|
+
from pymodaq_gui.utils.dock import DockArea, Dock
|
|
79
|
+
if init_qt: # used for the test suite
|
|
80
|
+
app = QtWidgets.QApplication(sys.argv)
|
|
81
|
+
|
|
82
|
+
actuators = [f'act{ind}' for ind in range(5)]
|
|
83
|
+
|
|
84
|
+
win = QtWidgets.QMainWindow()
|
|
85
|
+
area = DockArea()
|
|
86
|
+
win.setCentralWidget(area)
|
|
87
|
+
win.resize(1000, 500)
|
|
88
|
+
win.setWindowTitle('extension_name')
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
dock = Dock('Test')
|
|
92
|
+
dock.layout.setSpacing(0)
|
|
93
|
+
dock.layout.setContentsMargins(0,0,0,0)
|
|
94
|
+
area.addDock(dock)
|
|
95
|
+
widget = QtWidgets.QWidget()
|
|
96
|
+
widget.setMaximumHeight(60)
|
|
97
|
+
prog = DAQ_Move_UI_Relative(widget, title="test")
|
|
98
|
+
widget.show()
|
|
99
|
+
|
|
100
|
+
for ind in range(10):
|
|
101
|
+
widget = QtWidgets.QWidget()
|
|
102
|
+
widget.setMaximumHeight(60)
|
|
103
|
+
dock.addWidget(widget)
|
|
104
|
+
prog = DAQ_Move_UI_Relative(widget, title="test")
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
def print_command_sig(cmd_sig):
|
|
108
|
+
print(cmd_sig)
|
|
109
|
+
if cmd_sig.command == UiToMainMove.INIT:
|
|
110
|
+
prog.enable_move_buttons(True)
|
|
111
|
+
elif cmd_sig.command == UiToMainMove.MOVE_ABS:
|
|
112
|
+
prog.display_value(cmd_sig.attribute)
|
|
113
|
+
|
|
114
|
+
prog.command_sig.connect(print_command_sig)
|
|
115
|
+
prog.actuators = actuators
|
|
116
|
+
|
|
117
|
+
win.show()
|
|
118
|
+
if init_qt:
|
|
119
|
+
sys.exit(app.exec_())
|
|
120
|
+
return prog, widget
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
if __name__ == '__main__':
|
|
124
|
+
main()
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import sys
|
|
2
|
+
|
|
3
|
+
from qtpy.QtWidgets import QVBoxLayout, QToolBar
|
|
4
|
+
from qtpy import QtWidgets
|
|
5
|
+
|
|
6
|
+
from pymodaq.control_modules.daq_move_ui.ui_base import DAQ_Move_UI_Base
|
|
7
|
+
from pymodaq.control_modules.thread_commands import UiToMainMove
|
|
8
|
+
from pymodaq_gui.utils.widgets import LabelWithFont
|
|
9
|
+
from pymodaq_utils.utils import ThreadCommand
|
|
10
|
+
|
|
11
|
+
from pymodaq.control_modules.daq_move_ui.factory import ActuatorUIFactory
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
@ActuatorUIFactory.register('Simple')
|
|
15
|
+
class DAQ_Move_UI_Simple(DAQ_Move_UI_Base):
|
|
16
|
+
is_compact = True
|
|
17
|
+
def __init__(self, parent, title="DAQ_Move"):
|
|
18
|
+
|
|
19
|
+
super().__init__(parent, title)
|
|
20
|
+
|
|
21
|
+
def setup_docks(self):
|
|
22
|
+
super().setup_docks()
|
|
23
|
+
|
|
24
|
+
self.parent.setLayout(QVBoxLayout())
|
|
25
|
+
self.parent.layout().setContentsMargins(0, 0, 0, 0)
|
|
26
|
+
|
|
27
|
+
self.move_toolbar = QToolBar()
|
|
28
|
+
self.parent.layout().addWidget(self.move_toolbar)
|
|
29
|
+
|
|
30
|
+
self.abs_value_sb_2.setMinimumWidth(80)
|
|
31
|
+
self.abs_value_sb.setMinimumWidth(80)
|
|
32
|
+
self.current_value_sb.set_font_size(10)
|
|
33
|
+
self.current_value_sb.setMinimumHeight(20)
|
|
34
|
+
self.current_value_sb.setMinimumWidth(80)
|
|
35
|
+
|
|
36
|
+
self.control_widget = QtWidgets.QWidget()
|
|
37
|
+
self.populate_control_ui(self.control_widget)
|
|
38
|
+
|
|
39
|
+
def setup_actions(self):
|
|
40
|
+
self.add_widget('name', LabelWithFont(f'{self.title}', font_name="Tahoma",
|
|
41
|
+
font_size=14, isbold=True, isitalic=True),
|
|
42
|
+
toolbar=self.move_toolbar)
|
|
43
|
+
|
|
44
|
+
self.add_widget('actuators_combo', self.actuators_combo, toolbar=self.move_toolbar)
|
|
45
|
+
self.add_action('ini_actuator', 'Ini. Actuator', 'ini', toolbar=self.move_toolbar)
|
|
46
|
+
self.add_widget('ini_led', self.ini_state_led, toolbar=self.move_toolbar)
|
|
47
|
+
self.add_widget('current', self.current_value_sb, toolbar=self.move_toolbar)
|
|
48
|
+
self.add_widget('move_done', self.move_done_led, toolbar=self.move_toolbar)
|
|
49
|
+
self.add_widget('abs_green', self.abs_value_sb, toolbar=self.move_toolbar)
|
|
50
|
+
self.add_widget('abs_red', self.abs_value_sb_2, toolbar=self.move_toolbar)
|
|
51
|
+
self.add_action('move_abs', 'Move Abs', 'go_to_1', "Move to the set absolute value",
|
|
52
|
+
toolbar=self.move_toolbar)
|
|
53
|
+
self.add_action('move_abs_2', 'Move Abs', 'go_to_2', "Move to the other set absolute"
|
|
54
|
+
" value",
|
|
55
|
+
toolbar=self.move_toolbar)
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
self.add_action('stop', 'Stop', 'stop', "Stop Motion", toolbar=self.move_toolbar)
|
|
59
|
+
|
|
60
|
+
self.add_action('show_settings', 'Show Settings', 'tree', "Show Settings", checkable=True,
|
|
61
|
+
toolbar=self.move_toolbar)
|
|
62
|
+
self.add_action('show_controls', 'Show Controls', 'Add_Step', "Show more controls", checkable=True,
|
|
63
|
+
toolbar=self.move_toolbar)
|
|
64
|
+
self.add_action('show_graph', 'Show Graph', 'graph', "Show Graph", checkable=True,
|
|
65
|
+
toolbar=self.move_toolbar)
|
|
66
|
+
self.add_action('refresh_value', 'Refresh', 'Refresh2', "Refresh Value", checkable=True,
|
|
67
|
+
toolbar=self.move_toolbar)
|
|
68
|
+
self.move_toolbar.addSeparator()
|
|
69
|
+
self.add_action('show_config', 'Show Config', 'Settings', "Show PyMoDAQ Config", checkable=False,
|
|
70
|
+
toolbar=self.move_toolbar)
|
|
71
|
+
self.add_action('quit', 'Quit the module', 'close2', toolbar=self.move_toolbar)
|
|
72
|
+
self.add_action('log', 'Show Log file', 'information2', toolbar=self.move_toolbar)
|
|
73
|
+
self.add_widget('status', self.statusbar, toolbar=self.move_toolbar)
|
|
74
|
+
|
|
75
|
+
def connect_things(self):
|
|
76
|
+
super().connect_things()
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
def main(init_qt=True):
|
|
80
|
+
from pymodaq_gui.utils.dock import DockArea, Dock
|
|
81
|
+
if init_qt: # used for the test suite
|
|
82
|
+
app = QtWidgets.QApplication(sys.argv)
|
|
83
|
+
|
|
84
|
+
actuators = [f'act{ind}' for ind in range(5)]
|
|
85
|
+
|
|
86
|
+
win = QtWidgets.QMainWindow()
|
|
87
|
+
area = DockArea()
|
|
88
|
+
win.setCentralWidget(area)
|
|
89
|
+
win.resize(1000, 500)
|
|
90
|
+
win.setWindowTitle('extension_name')
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
dock = Dock('Test')
|
|
94
|
+
dock.layout.setSpacing(0)
|
|
95
|
+
dock.layout.setContentsMargins(0,0,0,0)
|
|
96
|
+
area.addDock(dock)
|
|
97
|
+
widget = QtWidgets.QWidget()
|
|
98
|
+
widget.setMaximumHeight(60)
|
|
99
|
+
prog = DAQ_Move_UI_Simple(widget, title="test")
|
|
100
|
+
widget.show()
|
|
101
|
+
|
|
102
|
+
for ind in range(10):
|
|
103
|
+
widget = QtWidgets.QWidget()
|
|
104
|
+
widget.setMaximumHeight(60)
|
|
105
|
+
dock.addWidget(widget)
|
|
106
|
+
prog = DAQ_Move_UI_Simple(widget, title="test")
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
def print_command_sig(cmd_sig):
|
|
110
|
+
print(cmd_sig)
|
|
111
|
+
if cmd_sig.command == UiToMainMove.INIT:
|
|
112
|
+
prog.enable_move_buttons(True)
|
|
113
|
+
elif cmd_sig.command == UiToMainMove.MOVE_ABS:
|
|
114
|
+
prog.display_value(cmd_sig.attribute)
|
|
115
|
+
|
|
116
|
+
prog.command_sig.connect(print_command_sig)
|
|
117
|
+
prog.actuators = actuators
|
|
118
|
+
|
|
119
|
+
win.show()
|
|
120
|
+
if init_qt:
|
|
121
|
+
sys.exit(app.exec_())
|
|
122
|
+
return prog, widget
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
if __name__ == '__main__':
|
|
126
|
+
main()
|