Logo Search packages:      
Sourcecode: quickly-widgets version File versions  Download package

def widgets::grid_filter::GridFilter::__filter_func (   self,
  model,
  iter,
  data 
) [private]

filter_func: called for each row in the treeview model in response to
a __filter_changed signal. Determines for each row whether it should be
visible based on the FilterRows in the GridFilter.

Definition at line 104 of file grid_filter.py.

00104                                            :
  """filter_func: called for each row in the treeview model in response to
  a __filter_changed signal. Determines for each row whether it should be
  visible based on the FilterRows in the GridFilter.

  """
  #determine whether this is an "and" or an "or" filter
  match_all = self.and_button.get_active()

  for r in self.rows:
   rez = r.is_match(iter.copy(),model)  #check the result of each filter
   if match_all:                        #if it's an "and" filter
    if not rez:                         #and if the filter does not match
     return False                       #then the row should not be visible
   else:                                #but if it's an "or" filter
    if rez:                             #and it is a match
     return True                        #return that the row should be visible
  return match_all  #all filters match an "and" or none matched an "or" 
  
class FilterRow( gtk.HBox):


Generated by  Doxygen 1.6.0   Back to index