Built-in Parameter Types¶
Parameters¶
-
class
pyqtgraph.parametertree.parameterTypes.
SimpleParameter
(*args, **kargs)[source]¶ Parameter representing a single value.
This parameter is backed by
WidgetParameterItem
to represent the following parameter names:‘int’
‘float’
‘bool’
‘str’
‘color’
‘colormap’
-
itemClass
¶ alias of
pyqtgraph.parametertree.parameterTypes.WidgetParameterItem
-
class
pyqtgraph.parametertree.parameterTypes.
GroupParameter
(**opts)[source]¶ Group parameters are used mainly as a generic parent item that holds (and groups!) a set of child parameters.
It also provides a simple mechanism for displaying a button or combo that can be used to add new parameters to the group. To enable this, the group must be initialized with the ‘addText’ option (the text will be displayed on a button which, when clicked, will cause addNew() to be called). If the ‘addList’ option is specified as well, then a dropdown-list of addable items will be displayed instead of a button.
-
addNew
(typ=None)[source]¶ This method is called when the user has requested to add a new item to the group. By default, it emits
sigAddNew(self, typ)
.
-
itemClass
¶ alias of
pyqtgraph.parametertree.parameterTypes.GroupParameterItem
-
-
class
pyqtgraph.parametertree.parameterTypes.
ListParameter
(**opts)[source]¶ Parameter with a list of acceptable values.
By default, this parameter is represtented by a
ListParameterItem
, displaying a combo box to select a value from the list.In addition to the generic
Parameter
options, this parameter type accepts alimits
argument specifying the list of allowed values.values
is an alias and may be used instead.The values may generally be of any data type, as long as they can be represented as a string. If the string representation provided is undesirable, the values may be given as a dictionary mapping the desired string representation to the value.
-
itemClass
¶ alias of
pyqtgraph.parametertree.parameterTypes.ListParameterItem
-
-
class
pyqtgraph.parametertree.parameterTypes.
TextParameter
(**opts)[source]¶ Editable string, displayed as large text box in the tree.
-
itemClass
¶ alias of
pyqtgraph.parametertree.parameterTypes.TextParameterItem
-
-
class
pyqtgraph.parametertree.parameterTypes.
ActionParameter
(**opts)[source]¶ Used for displaying a button within the tree.
sigActivated(self)
is emitted when the button is clicked.-
itemClass
¶ alias of
pyqtgraph.parametertree.parameterTypes.ActionParameterItem
-
ParameterItems¶
-
class
pyqtgraph.parametertree.parameterTypes.
WidgetParameterItem
(param, depth)[source]¶ ParameterTree item with:
label in second column for displaying value
simple widget for editing value (displayed instead of label when item is selected)
button that resets value to default
Registered Types:
int
Displays a
SpinBox
in integer mode.float
Displays a
SpinBox
.bool
Displays a QCheckBox
str
Displays a QLineEdit
color
Displays a
ColorButton
colormap
Displays a
GradientWidget
This class can be subclassed by overriding makeWidget() to provide a custom widget.
-
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 is a good function to override in subclasses.
-
optsChanged
(param, opts)[source]¶ Called when any options are changed that are not name, value, default, or limits
-
class
pyqtgraph.parametertree.parameterTypes.
GroupParameterItem
(param, depth)[source]¶ Group parameters are used mainly as a generic parent item that holds (and groups!) a set of child parameters. It also provides a simple mechanism for displaying a button or combo that can be used to add new parameters to the group.
-
class
pyqtgraph.parametertree.parameterTypes.
ListParameterItem
(param, depth)[source]¶ WidgetParameterItem subclass providing comboBox that lets the user select from a list of options.