-rw-r--r-- | libkcal/calfilter.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libkcal/calfilter.h b/libkcal/calfilter.h index d6d4717..5ad0064 100644 --- a/libkcal/calfilter.h +++ b/libkcal/calfilter.h | |||
@@ -9,120 +9,120 @@ | |||
9 | 9 | ||
10 | This library is distributed in the hope that it will be useful, | 10 | This library is distributed in the hope that it will be useful, |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
13 | Library General Public License for more details. | 13 | Library General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU Library General Public License | 15 | You should have received a copy of the GNU Library General Public License |
16 | along with this library; see the file COPYING.LIB. If not, write to | 16 | along with this library; see the file COPYING.LIB. If not, write to |
17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | 17 | the Free Software Foundation, Inc., 59 Temple Place - Suite 330, |
18 | Boston, MA 02111-1307, USA. | 18 | Boston, MA 02111-1307, USA. |
19 | */ | 19 | */ |
20 | 20 | ||
21 | #ifndef _CALFILTER_H | 21 | #ifndef _CALFILTER_H |
22 | #define _CALFILTER_H | 22 | #define _CALFILTER_H |
23 | 23 | ||
24 | #include <qstring.h> | 24 | #include <qstring.h> |
25 | #include <qptrlist.h> | 25 | #include <qptrlist.h> |
26 | 26 | ||
27 | #include "event.h" | 27 | #include "event.h" |
28 | #include "todo.h" | 28 | #include "todo.h" |
29 | 29 | ||
30 | namespace KCal { | 30 | namespace KCal { |
31 | 31 | ||
32 | /** | 32 | /** |
33 | Filter for calendar objects. | 33 | Filter for calendar objects. |
34 | */ | 34 | */ |
35 | class CalFilter { | 35 | class CalFilter { |
36 | public: | 36 | public: |
37 | /** Construct filter. */ | 37 | /** Construct filter. */ |
38 | CalFilter(); | 38 | CalFilter(); |
39 | /** Construct filter with name */ | 39 | /** Construct filter with name */ |
40 | CalFilter(const QString &name); | 40 | CalFilter(const QString &name); |
41 | /** Destruct filter. */ | 41 | /** Destruct filter. */ |
42 | ~CalFilter(); | 42 | ~CalFilter(); |
43 | 43 | ||
44 | /** | 44 | /** |
45 | Set name of filter. | 45 | Set name of filter. |
46 | */ | 46 | */ |
47 | void setName(const QString &name) { mName = name; } | 47 | void setName(const QString &name) { mName = name; } |
48 | /** | 48 | /** |
49 | Return name of filter. | 49 | Return name of filter. |
50 | */ | 50 | */ |
51 | QString name() const { return mName; } | 51 | QString name() const { return mName; } |
52 | 52 | ||
53 | /** | 53 | /** |
54 | Apply filter to eventlist, all events not matching filter criterias are | 54 | Apply filter to eventlist, all events not matching filter criterias are |
55 | removed from the list. | 55 | removed from the list. |
56 | */ | 56 | */ |
57 | void apply(QPtrList<Event> *eventlist); | 57 | void apply(QPtrList<Event> *eventlist); |
58 | 58 | ||
59 | /** | 59 | /** |
60 | Apply filter to todolist, all todos not matching filter criterias are | 60 | Apply filter to todolist, all todos not matching filter criterias are |
61 | removed from the list. | 61 | removed from the list. |
62 | */ | 62 | */ |
63 | void apply(QPtrList<Todo> *todolist); | 63 | void apply(QPtrList<Todo> *todolist); |
64 | 64 | ||
65 | /** | 65 | /** |
66 | Apply filter criteria on the specified event. Return true, if event passes | 66 | Apply filter criteria on the specified event. Return true, if event passes |
67 | criteria, otherwise return false. | 67 | criteria, otherwise return false. |
68 | */ | 68 | */ |
69 | bool filterEvent(Event *); | 69 | bool filterEvent(Event *); |
70 | 70 | ||
71 | /** | 71 | /** |
72 | Apply filter criteria on the specified todo. Return true, if event passes | 72 | Apply filter criteria on the specified todo. Return true, if event passes |
73 | criteria, otherwise return false. | 73 | criteria, otherwise return false. |
74 | */ | 74 | */ |
75 | bool filterTodo(Todo *); | 75 | bool filterTodo(Todo *); |
76 | 76 | ||
77 | /** | 77 | /** |
78 | Apply filter criteria on the specified incidence. Return true, if event passes | 78 | Apply filter criteria on the specified incidence. Return true, if event passes |
79 | criteria, otherwise return false. | 79 | criteria, otherwise return false. |
80 | */ | 80 | */ |
81 | bool filterIncidence(Incidence *); | 81 | bool filterIncidence(Incidence *); |
82 | 82 | ||
83 | /** | 83 | /** |
84 | Enable or disable filter. | 84 | Enable or disable filter. |
85 | */ | 85 | */ |
86 | void setEnabled(bool); | 86 | void setEnabled(bool); |
87 | /** | 87 | /** |
88 | Return wheter the filter is enabled or not. | 88 | Return wheter the filter is enabled or not. |
89 | */ | 89 | */ |
90 | bool isEnabled(); | 90 | bool isEnabled(); |
91 | bool showCategories(); | 91 | bool showCategories(); |
92 | int getSecrecy(); | 92 | int getSecrecy(); |
93 | /** | 93 | /** |
94 | Set list of categories, which is used for showing/hiding categories of | 94 | Set list of categories, which is used for showing/hiding categories of |
95 | events. | 95 | events. |
96 | See related functions. | 96 | See related functions. |
97 | */ | 97 | */ |
98 | void setCategoryList(const QStringList &); | 98 | void setCategoryList(const QStringList &); |
99 | /** | 99 | /** |
100 | Return category list, used for showing/hiding categories of events. | 100 | Return category list, used for showing/hiding categories of events. |
101 | See related functions. | 101 | See related functions. |
102 | */ | 102 | */ |
103 | QStringList categoryList(); | 103 | QStringList categoryList(); |
104 | 104 | ||
105 | enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4 ,ShowPublic = 8, ShowPrivate = 16, ShowConfidential = 32 }; | 105 | enum { HideRecurring = 1, HideCompleted = 2, ShowCategories = 4 ,ShowPublic = 8, ShowPrivate = 16, ShowConfidential = 32, HideEvents = 64, HideTodos = 128, HideJournals = 256 }; |
106 | 106 | ||
107 | /** | 107 | /** |
108 | Set criteria, which have to be fulfilled by events passing the filter. | 108 | Set criteria, which have to be fulfilled by events passing the filter. |
109 | */ | 109 | */ |
110 | void setCriteria(int); | 110 | void setCriteria(int); |
111 | /** | 111 | /** |
112 | Get inclusive filter criteria. | 112 | Get inclusive filter criteria. |
113 | */ | 113 | */ |
114 | int criteria(); | 114 | int criteria(); |
115 | 115 | ||
116 | private: | 116 | private: |
117 | QString mName; | 117 | QString mName; |
118 | 118 | ||
119 | int mCriteria; | 119 | int mCriteria; |
120 | 120 | ||
121 | bool mEnabled; | 121 | bool mEnabled; |
122 | 122 | ||
123 | QStringList mCategoryList; | 123 | QStringList mCategoryList; |
124 | }; | 124 | }; |
125 | 125 | ||
126 | } | 126 | } |
127 | 127 | ||
128 | #endif /* _CALFILTER_H */ | 128 | #endif /* _CALFILTER_H */ |