class_docstr: Parameter with a list of acceptable values.
  
  By default, this parameter is represtented by a :class:`ListParameterItem`,
  displaying a combo box to select a value from the list.
  
  In addition to the generic :class:`~pyqtgraph.parametertree.Parameter`
  options, this parameter type accepts a ``limits`` argument specifying the
  list of allowed values.
  
  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.
class_docstr_tok: ["Parameter","with","a","list","of","acceptable","values",".","By","default",",","this","parameter","is","represtented","by","a",":","class",":","`","ListParameterItem","`",",","displaying","a","combo","box","to","select","a","value","from","the","list",".","In","addition","to","the","generic",":","class",":","`","~pyqtgraph.parametertree.Parameter","`","options",",","this","parameter","type","accepts","a","``","limits","``","argument","specifying","the","list","of","allowed","values",".","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","."]
docstr: Change the list of allowed values.
docstr_tok: ["Change","the","list","of","allowed","values","."]
code: def setLimits(self, limits):
      """Change the list of allowed values."""
      self.forward, self.reverse = self.mapping(limits)
  
      Parameter.setLimits(self, limits)
      # 'value in limits' expression will break when reverse contains numpy array
      curVal = self.value()
      if len(self.reverse[0]) > 0 and not any(
          fn.eq(curVal, limVal) for limVal in self.reverse[0]
      ):
          self.setValue(self.reverse[0][0])
  
file_path: pyqtgraph/pyqtgraph/parametertree/parameterTypes/list.py
imports: import warnings
  from collections import OrderedDict
  from ...None import functions
  from ...Qt import QtWidgets
  from ..Parameter import Parameter
  from .basetypes import WidgetParameterItem
label_desc: Use image node_id 2 for calling the ListParameter obj's underlying member method code with example usage: obj.setLimits(limits) without return types