KDE PIM / Developers / API Docs / kaddressbook

Filter Class Reference

Filter for AddressBook related objects (Addressees). More...

#include <filter.h>

List of all members.

Public Types

Public Member Functions

Static Public Member Functions


Detailed Description

Filter for AddressBook related objects (Addressees).


Member Function Documentation

void Filter::setName const QString &  name  ) 
 

Set the name of the filter.

const QString & Filter::name  )  const
 

Returns:
The name of the filter.

bool Filter::isInternal  )  const
 

Returns:
Whether the filter is an internal one.

void Filter::apply KABC::Addressee::List &  addresseeList  ) 
 

Apply the filter to the addressee list.

All addressees not passing the filter criterias will be removed from the list.

If the MatchRule is NotMatch, then all the addressees matching the filter will be removed from the list.

bool Filter::filterAddressee const KABC::Addressee &  a  )  const
 

Apply the filter to the addressee.

Returns:
True if the addressee passes the criteria, false otherwise. The return values are opposite if the MatchRule is NotMatch.

void Filter::setEnabled bool  on  ) 
 

Enable or disable the filter.

bool Filter::isEnabled  )  const
 

Returns:
True if this filter is enabled, false otherwise.

void Filter::setCategories const QStringList &  list  ) 
 

Set the list of categories.

This list is used to filter addressees.

const QStringList & Filter::categories  )  const
 

Returns:
The list of categories.

void Filter::save KConfig *  config  ) 
 

Saves the filter to the config file.

The group should already be set.

void Filter::restore KConfig *  config  ) 
 

Loads the filter from the config file.

The group should already be set.

void Filter::save KConfig *  config,
const QString &  baseGroup,
Filter::List &  list
[static]
 

Saves a list of filters to the config file.

Parameters:
config The config file to use
baseGroup The base groupname to use. The number of filters will be written to this group, then a _1, _2, etc will be append for each filter saved.
list The list of filters to be saved.

Filter::List Filter::restore KConfig *  config,
const QString &  baseGroup
[static]
 

Restores a list of filters from a config file.

Parameters:
config The config file to read from.
baseGroup The base group name to be used to find the filters
Returns:
The list of filters.

void Filter::setMatchRule MatchRule  rule  ) 
 

Sets the filter rule.

If the rule is Filter::Matching (default), then the filter will return true on items that match the filter. If the rule is Filter::NotMatching, then the filter will return true on items that do not match the filter.

Filter::MatchRule Filter::matchRule  )  const
 

Returns:
The current match rule.

bool Filter::isEmpty  )  const
 

Returns:
true if the category list is empty.

The documentation for this class was generated from the following files: