KCalCore Library
calfilter.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00031 #ifndef KCALCORE_CALFILTER_H
00032 #define KCALCORE_CALFILTER_H
00033
00034 #include "kcalcore_export.h"
00035 #include "event.h"
00036 #include "journal.h"
00037 #include "todo.h"
00038
00039 namespace KCalCore {
00040
00055 class KCALCORE_EXPORT CalFilter
00056 {
00057 public:
00061 enum Criteria {
00062 HideRecurring = 1,
00063 HideCompletedTodos = 2,
00064 ShowCategories = 4,
00065 HideInactiveTodos = 8,
00066 HideNoMatchingAttendeeTodos = 16
00067 };
00068
00072 CalFilter();
00073
00079 explicit CalFilter( const QString &name );
00080
00084 ~CalFilter();
00085
00092 void setName( const QString &name );
00093
00098 QString name() const;
00099
00107 void setCriteria( int criteria );
00108
00113 int criteria() const;
00114
00121 void apply( Event::List *eventList ) const;
00122
00129 void apply( Todo::List *todoList ) const;
00130
00137 void apply( Journal::List *journalList ) const;
00138
00145 bool filterIncidence( Incidence::Ptr incidence ) const;
00146
00153 void setEnabled( bool enabled );
00154
00159 bool isEnabled() const;
00160
00168 void setCategoryList( const QStringList &categoryList );
00169
00174 QStringList categoryList() const;
00175
00183 void setEmailList( const QStringList &emailList );
00184
00189 QStringList emailList() const;
00190
00201 void setCompletedTimeSpan( int timespan );
00202
00207 int completedTimeSpan() const;
00208
00214 bool operator==( const CalFilter &filter ) const;
00215
00216 private:
00217
00218 Q_DISABLE_COPY( CalFilter )
00219 class Private;
00220 Private *const d;
00221
00222 };
00223
00224 }
00225
00226 #endif