def METHOD_NAME(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)