KCal Library
calfilter.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 2001,2003,2004 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00031 #ifndef KCAL_CALFILTER_H 00032 #define KCAL_CALFILTER_H 00033 00034 #include <QtCore/QString> 00035 00036 #include "kcal_export.h" 00037 #include "event.h" 00038 #include "todo.h" 00039 #include "journal.h" 00040 00041 namespace KCal { 00042 00057 class KCAL_EXPORT_DEPRECATED CalFilter 00058 { 00059 public: 00063 enum Criteria { 00064 HideRecurring = 1, 00065 HideCompletedTodos = 2, 00066 ShowCategories = 4, 00067 HideInactiveTodos = 8, 00068 HideNoMatchingAttendeeTodos = 16 00069 }; 00070 00074 CalFilter(); 00075 00081 explicit CalFilter( const QString &name ); 00082 00086 ~CalFilter(); 00087 00094 void setName( const QString &name ); 00095 00100 QString name() const; 00101 00109 void setCriteria( int criteria ); 00110 00115 int criteria() const; 00116 00123 void apply( Event::List *eventList ) const; 00124 00131 void apply( Todo::List *todoList ) const; 00132 00139 void apply( Journal::List *journalList ) const; 00140 00147 bool filterIncidence( Incidence *incidence ) const; 00148 00155 void setEnabled( bool enabled ); 00156 00161 bool isEnabled() const; 00162 00170 void setCategoryList( const QStringList &categoryList ); 00171 00176 QStringList categoryList() const; 00177 00185 void setEmailList( const QStringList &emailList ); 00186 00191 QStringList emailList() const; 00192 00203 void setCompletedTimeSpan( int timespan ); 00204 00209 int completedTimeSpan() const; 00210 00216 //KDE5: make const 00217 bool operator==( const CalFilter &filter ); //krazy:exclude=operators 00218 00219 private: 00220 //@cond PRIVATE 00221 Q_DISABLE_COPY( CalFilter ) 00222 class Private; 00223 Private *const d; 00224 //@endcond 00225 }; 00226 00227 } 00228 00229 #endif