-rw-r--r-- | kaddressbook/filter.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kaddressbook/filter.h b/kaddressbook/filter.h index cf2c0a1..26870d7 100644 --- a/kaddressbook/filter.h +++ b/kaddressbook/filter.h @@ -18,48 +18,51 @@ As a special exception, permission is given to link this program with any edition of Qt, and distribute the resulting executable, without including the source code for Qt in the source distribution. */ #ifndef FILTER_H #define FILTER_H #include <qstring.h> #include <qstringlist.h> #include <qvaluelist.h> #include <kabc/addressee.h> #include <kconfig.h> /** Filter for AddressBook related objects (Addressees) @todo This class should be switched to use shared data. */ class Filter { public: + enum { ShowPublic = 1, ShowPrivate = 2, ShowConfidential = 4}; + void setCriteria(int c) { mCriteria = c ;} + int criteria() const { return mCriteria;} typedef QValueList<Filter> List; enum MatchRule { Matching = 0, NotMatching = 1 }; Filter(); Filter( const QString& name ); ~Filter(); /** Set the name of the filter. */ void setName( const QString &name ); /** @return The name of the filter. */ const QString &name() const; /** @return Whether the filter is an internal one. */ bool isInternal() const; /** @@ -122,32 +125,33 @@ class Filter /** Restores a list of filters from a config file. @param config The config file to read from. @param baseGroup The base group name to be used to find the filters @return The list of filters. */ static Filter::List restore( KConfig *config, QString baseGroup ); /** 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. */ void setMatchRule( MatchRule rule ); /** @return The current match rule. */ MatchRule matchRule() const; private: + int mCriteria; QString mName; QStringList mCategoryList; MatchRule mMatchRule; bool mEnabled; bool mInternal; }; #endif |