'Set the filtering function.'

def setFilterFunc(self, func):

    if (not (isinstance(func, Callable) or (func is None))):
        raise ValueError('A    callable    object    or    None    expected.')
    if (self.__filterFunc is not func):
        self.__filterFunc = func
        self.invalidateFilter()
