11.3.2.1. New Tree items

Documentation on the added or modified ParameterItem types compared to pyqtgraph.parametertree.parameterTypes module.

WidgetParameterItem and SimpleParameter have been subclassed to define more options:

  • int and float: represented by a custom Spinbox, see SpinBoxCustom()
  • bool, led, bool_push are represented respectively by a QCheckBox(), a QLED(), QPushButton()
  • str displays a QLineEdit widget
  • date_time displays a QDateTime widget
  • date displays a QDate widget
  • time displays a QTimeCustom() widget
  • pixmap displays a QPixmap in a QLabel
  • pixmap_check displays a custom Pixmap_check() widget

Other widgets for ParameterTree have been introduced:

  • group: subclassed group parameter, see GroupParameterCustom() and GroupParameterItemCustom()
  • slide: displays a custom Spinbox and a QSlider to set floats and ints, see SliderSpinBox()
  • list: subclassed pyqtgraph list that displays a list and a pushbutton to let the user add entries in the list, see ListParameter_custom() and ListParameterItem_custom() and Combo_pb()
  • table: subclassed pyqtgraph table, see TableParameterItem(), TableParameter() and Table_custom()
  • table_view : displaying a QTableView with custom model to be user defined, see Qt5 documentation, see TableViewParameterItem(), TableViewCustom() and TableViewParameter()
  • ìtemselect: displays a QListWidget with selectable elements, see ItemSelectParameterItem(), ItemSelect_pb(), ItemSelect() and ItemSelectParameter()
  • browsepath: displays an edit line and a push button to select files or folders, see file_browserParameterItem(), file_browser() and file_browserParameter()
  • text`: subclassed plain text area text from pyqtgraph with limited height, see TextParameterItemCustom() and TextParameter()
  • text_pb: displays a plain text area and a visible button to add data into it, see Plain_text_pbParameterItem(), Plain_text_pb() and Plain_text_pbParameter()
pymodaq.daq_utils.parameter.pymodaq_ptypes.GroupParameterCustom

alias of pyqtgraph.parametertree.parameterTypes.basetypes.GroupParameter

class pymodaq.daq_utils.parameter.pymodaq_ptypes.SliderParameterItem(param, depth)[source]

Registered parameter type which displays a QLineEdit

makeWidget()[source]

Return a single widget whose position in the tree is determined by the value of self.asSubItem. If True, it will be placed in the second tree column, and if False, the first tree column of a child item.

The widget must be given three attributes:

sigChanged a signal that is emitted when the widget’s value is changed
value a function that returns the value
setValue a function that sets the value

This function must be overridden by a subclass.

class pymodaq.daq_utils.parameter.pymodaq_ptypes.SliderSpinBox(*args, subtype='lin', **kwargs)[source]
initUI(*args, **kwargs)[source]

Init the User Interface.

update_slide(val)[source]

val is the spinbox value between its min and max

update_spinbox(val)[source]

val is a percentage [0-100] used in order to set the spinbox value between its min and max

class pymodaq.daq_utils.parameter.pymodaq_ptypes.TableParameter(**opts)[source]
Attributes Type
itemClass instance of TableParameterItem
Parameter instance of pyqtgraph parameter
itemClass

Editable string; displayed as large text box in the tree.

alias of TableParameterItem

setValue(value)[source]

Set the value of this Parameter; return the actual value that was set. (this may be different from the value that was requested)

class pymodaq.daq_utils.parameter.pymodaq_ptypes.TableViewCustom(menu=False)[source]
Attributes* Type
valuechanged instance of pyqt Signal
QtWidgets instance of QTableWidget
contextMenuEvent(self, QContextMenuEvent)[source]
get_table_value()[source]
set_table_value(data_model)[source]
class pymodaq.daq_utils.parameter.pymodaq_ptypes.TableViewParameter(**opts)[source]
Attributes Type
itemClass instance of TableParameterItem
Parameter instance of pyqtgraph parameter
itemClass

alias of TableViewParameterItem

setValue(value)[source]

Set the value of this Parameter; return the actual value that was set. (this may be different from the value that was requested)

class pymodaq.daq_utils.parameter.pymodaq_ptypes.ItemSelectParameter(**opts)[source]

Editable string; displayed as large text box in the tree.

Attributes Type
itemClass instance of ItemSelectParameterItem
sigActivated instance of pyqt Signal
itemClass

alias of ItemSelectParameterItem

activate()[source]

Activate the “Activated” signal attribute0