8.5.1.7. pymodaq_gui.examples.parameter_ex module

S Weber 2020 Examples of custome parameter types derived from pyqtgraph

class pymodaq_gui.examples.parameter_ex.ParameterEx[source]

Bases: ParameterManager

Methods

limits_changed(param, data)

options_changed(param, data)

value_changed

limits_changed(param, data)[source]
options_changed(param, data)[source]
value_changed(param)[source]
params = [{'children': [{'children': [], 'name': 'agroup', 'title': 'A visible group:', 'type': 'group'}, {'children': [], 'name': 'bgroup', 'title': 'An hidden group:', 'type': 'group', 'visible': False}, {'addMenu': {'Menu_1': {'SubMenu_11': ['SubSubMenu_111', 'SubSubMenu_112', 'SubSubMenu_113'], 'SubMenu_12': ['SubSubMenu_121', 'SubSubMenu_122', 'SubSubMenu_123'], 'SubMenu_13': ['SubSubMenu_131', 'SubSubMenu_132', 'SubSubMenu_133']}, 'Menu_2': {'SubMenu_21': ['SubSubMenu_211', 'SubSubMenu_212', 'SubSubMenu_213'], 'SubMenu_22': ['SubSubMenu_221', 'SubSubMenu_222', 'SubSubMenu_223'], 'SubMenu_23': ['SubSubMenu_231', 'SubSubMenu_232', 'SubSubMenu_233']}, 'Menu_3': {'SubMenu_31': ['SubSubMenu_311', 'SubSubMenu_312', 'SubSubMenu_313'], 'SubMenu_32': ['SubSubMenu_321', 'SubSubMenu_322', 'SubSubMenu_323'], 'SubMenu_33': ['SubSubMenu_331', 'SubSubMenu_332', 'SubSubMenu_333']}}, 'addText': 'Add', 'name': 'cgroup', 'title': 'An expandable group:', 'type': 'groupedit'}, {'children': [{'name': 'a_bool_in_a_bool', 'title': 'A bool in a bool', 'type': 'bool', 'value': True}, {'children': [{'name': 'atte_in_a_group', 'title': 'A string in a group', 'type': 'str', 'value': 'this is a string you can edit'}], 'label': 'action', 'name': 'aboolpush', 'title': 'A push with children', 'type': 'bool_push', 'value': True}], 'name': 'booleans_group', 'tip': 'Any Parameter can have its own children', 'title': 'A bool with children:', 'type': 'bool', 'value': False}], 'name': 'groups', 'title': 'Groups:', 'type': 'group'}, {'children': [{'min': 1.0, 'name': 'afloat', 'tip': 'displays this text as a tooltip', 'title': 'Standard float', 'type': 'float', 'value': 20.0}, {'min': 1.0, 'name': 'anotherfloat', 'tip': 'displays this text as a tooltip', 'title': 'Another float', 'type': 'float', 'value': 123.0}, {'default': 50, 'max': 123, 'min': 0, 'name': 'linearslidefloat', 'subtype': 'linear', 'title': 'Linear Slide float', 'type': 'slide', 'value': 50}, {'default': 50, 'limits': (24, 123), 'name': 'linearslidefloatlimits', 'subtype': 'linear', 'title': 'Linear Slide float w limits', 'type': 'slide', 'value': 50}, {'default': 50, 'int': True, 'max': 123, 'min': 0, 'name': 'linearslideint', 'step': 1, 'subtype': 'linear', 'title': 'Linear int Slide', 'type': 'slide', 'value': 50}, {'default': 50, 'max': 1000000.0, 'min': 0, 'name': 'linearslidewithsuffixandsiPrefix', 'siPrefix': True, 'subtype': 'linear', 'suffix': 'V', 'title': 'Linear Slide with suffix', 'type': 'slide', 'value': 50}, {'default': 50, 'max': 100000.0, 'min': 1e-05, 'name': 'logslidefloat', 'siPrefix': True, 'subtype': 'log', 'suffix': 'V', 'title': 'Log Slide float', 'type': 'slide', 'value': 50}], 'name': 'numbers', 'title': 'Numbers:', 'type': 'group'}, {'children': [{'name': 'abool', 'title': 'Standard bool', 'type': 'bool', 'value': True}, {'label': 'action', 'name': 'aboolpush', 'title': 'bool push', 'type': 'bool_push', 'value': True}, {'name': 'aled', 'tip': 'a led you cannot toggle', 'title': 'A led', 'type': 'led', 'value': False}, {'name': 'anotherled', 'tip': 'a led you can toggle', 'title': 'A led', 'type': 'led_push', 'value': True}], 'name': 'booleans', 'title': 'Booleans:', 'type': 'group'}, {'children': [{'name': 'atime', 'title': 'Time:', 'type': 'time', 'value': PyQt6.QtCore.QTime(13, 14, 21, 955)}, {'format': 'dd/MM/yyyy', 'name': 'adate', 'title': 'Date:', 'type': 'date', 'value': PyQt6.QtCore.QDate(2026, 6, 4)}, {'format': 'MM/dd/yyyy hh:mm', 'name': 'adatetime', 'tip': 'displays this text as a tooltip', 'title': 'DateTime:', 'type': 'date_time', 'value': PyQt6.QtCore.QDateTime(2026, 6, 4, 13, 14, 21, 955)}], 'name': 'datetimes', 'title': 'DateTime:', 'type': 'group'}, {'name': 'action', 'title': 'An action', 'type': 'action'}, {'children': [{'limits': ['a value', 'another one'], 'name': 'alist', 'title': 'Standard list:', 'type': 'list', 'value': 'a value'}, {'limits': ['a value', 'another one'], 'name': 'anotherlist', 'show_pb': True, 'tip': 'when using the "show_pb" option, displays a plus button to add elt to the list', 'title': 'List with add:', 'type': 'list', 'value': 'a value'}, {'limits': {'xaxis': 0, 'yaxis': [0, 1, 2]}, 'name': 'dict_list', 'tip': 'Such a parameter display text that are keys of a dict whilevalues could be any object', 'title': 'List defined from a dict:', 'type': 'list', 'value': 'yaxis'}], 'name': 'lists', 'title': 'Lists:', 'type': 'group'}, {'children': [{'filetype': True, 'name': 'afile', 'tip': 'If filetype is True select a file otherwise a directory', 'title': 'Look for a file:', 'type': 'browsepath', 'value': ''}, {'filetype': False, 'name': 'adir', 'tip': 'If filetype is True select a file otherwise a directory', 'title': 'Look for a dir:', 'type': 'browsepath', 'value': ''}], 'name': 'browser', 'title': 'Browsing files:', 'type': 'group'}, {'children': [{'name': 'items', 'tip': 'Press Ctrl+click  to select items in any order', 'title': 'Selectable items', 'type': 'itemselect', 'value': {'all_items': ['item1', 'item2', 'item3', 'item4', 'item5'], 'selected': ['item2']}}, {'name': 'itemsbis', 'show_pb': True, 'tip': 'If show_pb is True, user can add items to the list', 'title': 'Selectable items', 'type': 'itemselect', 'value': {'all_items': ['item1', 'item2', 'item3'], 'selected': ['item2']}}, {'name': 'itemsbisbis', 'show_mb': True, 'tip': 'If show_mb is True, user can remove selected items from the list', 'title': 'Removable items', 'type': 'itemselect', 'value': {'all_items': ['item1', 'item2', 'item3'], 'selected': ['item2']}}, {'checkbox': True, 'name': 'itemscheckable', 'show_mb': True, 'show_pb': True, 'tip': 'If checkbox is True, user can select item by checking/unchecking items. Remove items is still used with standard selections', 'title': 'Checkable items', 'type': 'itemselect', 'value': {'all_items': ['item1', 'item2', 'item3'], 'selected': ['item2']}}, {'checkbox': True, 'dragdrop': True, 'name': 'itemsdragablecheckable', 'tip': 'If dragdrop is True, user can drag or drop items inside the list', 'title': 'Dragable items', 'type': 'itemselect', 'value': {'all_items': ['item1', 'item2', 'item3'], 'selected': ['item2']}}], 'name': 'itemss', 'title': 'Selectable items:', 'type': 'group'}, {'children': [{'name': 'atte', 'title': 'Standard str', 'type': 'str', 'value': 'this is a string you can edit'}, {'name': 'text', 'title': 'Plain text', 'type': 'text', 'value': 'this is some text'}, {'name': 'textpb', 'tip': 'If text_pb type is used, user can add text to the parameter', 'title': 'Plain text', 'type': 'text_pb', 'value': 'this is some text'}], 'name': 'texts', 'title': 'Plain text:', 'type': 'group'}, {'children': [{'header': ['keys', 'limits'], 'height': 100, 'name': 'tablewidget', 'title': 'Table widget', 'type': 'table', 'value': {'key1': 'data1', 'key2': 24}}, {'delegate': <class 'pymodaq_gui.utils.widgets.table.SpinBoxDelegate'>, 'menu': True, 'name': 'tabular_table', 'tip': 'The advantage of the Table model lies in its modularity.\n For concrete examples see theTableModelTabular and the TableModelSequential custom models in the pymodaq.utils.scanner module', 'title': 'Table view', 'type': 'table_view', 'value': <pymodaq_gui.utils.widgets.table.TableModel object>}], 'name': 'tables', 'title': 'Tables:', 'type': 'group'}]
class pymodaq_gui.examples.parameter_ex.ScalableGroup(**opts)[source]

Bases: GroupParameter

Methods

addNew(full_path)

addNew(full_path)[source]
pymodaq_gui.examples.parameter_ex.main()[source]