libkcal

calfilter.h
1 /*
2  This file is part of libkcal.
3 
4  Copyright (c) 2001,2003,2004 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (C) 2003-2004 Reinhold Kainhofer <reinhold@kainhofer.com>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
22 #ifndef KCAL_CALFILTER_H
23 #define KCAL_CALFILTER_H
24 
25 #include <tqstring.h>
26 #include <tqptrlist.h>
27 
28 #include "event.h"
29 #include "todo.h"
30 #include "journal.h"
31 #include "libkcal_export.h"
32 
33 namespace KCal {
34 
38 class LIBKCAL_EXPORT CalFilter
39 {
40  public:
42  CalFilter();
44  CalFilter( const TQString &name );
46  ~CalFilter();
47 
51  void setName( const TQString &name ) { mName = name; }
55  TQString name() const { return mName; }
56 
61  void apply( Event::List *eventlist ) const;
62 
67  void apply( Todo::List *todolist ) const;
68 
73  void apply( Journal::List *journallist) const;
74 
79  bool filterIncidence( Incidence * ) const;
80 
84  void setEnabled( bool );
88  bool isEnabled() const;
89 
90 
96  void setCategoryList( const TQStringList & );
101  TQStringList categoryList() const;
102 
108  void setEmailList( const TQStringList & );
115  TQStringList emailList() const;
116 
117  enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4,
118  HideInactiveTodos = 8, HideTodosWithoutAttendeeInEmailList = 16 };
119 
123  void setCriteria( int );
127  int criteria() const;
128 
134  void setCompletedTimeSpan( int timespan );
139  int completedTimeSpan() const;
140 
141  private:
142  TQString mName;
143 
144  int mCriteria;
145 
146  bool mEnabled;
147 
148  TQStringList mCategoryList;
149  TQStringList mEmailList;
150  int mCompletedTimeSpan;
151 
152  class Private;
153  Private *d;
154 };
155 
156 }
157 
158 #endif
Filter for calendar objects.
Definition: calfilter.h:39
TQString name() const
Return name of filter.
Definition: calfilter.h:55
void setName(const TQString &name)
Set name of filter.
Definition: calfilter.h:51
This class provides the base class common to all calendar components.
Definition: incidence.h:48
Namespace KCal is for global classes, objects and/or functions in libkcal.
Definition: alarm.h:38