class_docstr: A parameter group that specifies a set of filters to apply to tabular data.
      
class_docstr_tok: ["A","parameter","group","that","specifies","a","set","of","filters","to","apply","to","tabular","data","."]
docstr: Set the list of fields that are available to be filtered.
  
  *fields* must be a dict or list of tuples that maps field names
  to a specification describing the field. Each specification is
  itself a dict with either ``'mode':'range'`` or ``'mode':'enum'``::
  
      filter.setFields([
          ('field1', {'mode': 'range'}),
          ('field2', {'mode': 'enum', 'values': ['val1', 'val2', 'val3']}),
          ('field3', {'mode': 'enum', 'values': {'val1':True, 'val2':False, 'val3':True}}),
      ])
docstr_tok: ["Set","the","list","of","fields","that","are","available","to","be","filtered",".","*","fields","*","must","be","a","dict","or","list","of","tuples","that","maps","field","names","to","a","specification","describing","the","field",".","Each","specification","is","itself","a","dict","with","either","``","'mode","'",":","'range","'","``","or","``","'mode","'",":","'enum","'","``",":",":","filter.setFields","(","[","(","'field1","'",",","{","'mode","'",":","'range","'","}",")",",","(","'field2","'",",","{","'mode","'",":","'enum","'",",","'values","'",":","[","'val1","'",",","'val2","'",",","'val3","'","]","}",")",",","(","'field3","'",",","{","'mode","'",":","'enum","'",",","'values","'",":","{","'val1","'",":","True",",","'val2","'",":","False",",","'val3","'",":","True","}","}",")",",","]",")"]
code: def setFields(self, fields):
      """Set the list of fields that are available to be filtered.
  
      *fields* must be a dict or list of tuples that maps field names
      to a specification describing the field. Each specification is
      itself a dict with either ``'mode':'range'`` or ``'mode':'enum'``::
  
          filter.setFields([
              ('field1', {'mode': 'range'}),
              ('field2', {'mode': 'enum', 'values': ['val1', 'val2', 'val3']}),
              ('field3', {'mode': 'enum', 'values': {'val1':True, 'val2':False, 'val3':True}}),
          ])
      """
      with fn.SignalBlock(self.sigTreeStateChanged, self.filterChanged):
          self.fields = OrderedDict(fields)
          names = self.fieldNames()
          self.setAddList(names)
  
          # update any existing filters
          for ch in self.children():
              name = ch.fieldName
              if name in fields:
                  ch.updateFilter(fields[name])
      self.sigFilterChanged.emit(self)
  
imports: from collections import OrderedDict
  import numpy
  from ..None import functions
  from ..None import parametertree
  from ..Qt import QtCore
label_desc: Use image node_id 5 for calling the DataFilterParameter obj's underlying member method code with example usage: obj.setFields(fields) without return types