author | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2007-07-04 11:23:42 (UTC) |
commit | a08aff328d4393031d5ba7d622c2b05705a89d73 (patch) (unidiff) | |
tree | 8ee90d686081c52e7c69b5ce946e9b1a7d690001 /libkcal/calfilter.cpp | |
parent | 11edc920afe4f274c0964436633aa632c8288a40 (diff) | |
download | kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.zip kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.gz kdepimpi-a08aff328d4393031d5ba7d622c2b05705a89d73.tar.bz2 |
initial public commit of qt4 portp1
-rw-r--r-- | libkcal/calfilter.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libkcal/calfilter.cpp b/libkcal/calfilter.cpp index 72f70c2..fa1dbd5 100644 --- a/libkcal/calfilter.cpp +++ b/libkcal/calfilter.cpp | |||
@@ -8,73 +8,75 @@ | |||
8 | version 2 of the License, or (at your option) any later version. | 8 | version 2 of the License, or (at your option) any later version. |
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 | #include <kdebug.h> | 21 | #include <kdebug.h> |
22 | 22 | ||
23 | #include "calfilter.h" | 23 | #include "calfilter.h" |
24 | //Added by qt3to4: | ||
25 | #include <Q3PtrList> | ||
24 | 26 | ||
25 | using namespace KCal; | 27 | using namespace KCal; |
26 | 28 | ||
27 | CalFilter::CalFilter() | 29 | CalFilter::CalFilter() |
28 | { | 30 | { |
29 | mEnabled = true; | 31 | mEnabled = true; |
30 | mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; | 32 | mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; |
31 | } | 33 | } |
32 | 34 | ||
33 | CalFilter::CalFilter(const QString &name) | 35 | CalFilter::CalFilter(const QString &name) |
34 | { | 36 | { |
35 | mName = name; | 37 | mName = name; |
36 | mEnabled = true; | 38 | mEnabled = true; |
37 | mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; | 39 | mCriteria = ShowPublic | ShowPrivate| ShowConfidential ; |
38 | } | 40 | } |
39 | 41 | ||
40 | CalFilter::~CalFilter() | 42 | CalFilter::~CalFilter() |
41 | { | 43 | { |
42 | } | 44 | } |
43 | 45 | ||
44 | void CalFilter::apply(QPtrList<Event> *eventlist) | 46 | void CalFilter::apply(Q3PtrList<Event> *eventlist) |
45 | { | 47 | { |
46 | if (!mEnabled) return; | 48 | if (!mEnabled) return; |
47 | 49 | ||
48 | // kdDebug(5800) << "CalFilter::apply()" << endl; | 50 | // kdDebug(5800) << "CalFilter::apply()" << endl; |
49 | 51 | ||
50 | Event *event = eventlist->first(); | 52 | Event *event = eventlist->first(); |
51 | while(event) { | 53 | while(event) { |
52 | if (!filterEvent(event)) { | 54 | if (!filterEvent(event)) { |
53 | eventlist->remove(); | 55 | eventlist->remove(); |
54 | event = eventlist->current(); | 56 | event = eventlist->current(); |
55 | } else { | 57 | } else { |
56 | event = eventlist->next(); | 58 | event = eventlist->next(); |
57 | } | 59 | } |
58 | } | 60 | } |
59 | 61 | ||
60 | // kdDebug(5800) << "CalFilter::apply() done" << endl; | 62 | // kdDebug(5800) << "CalFilter::apply() done" << endl; |
61 | } | 63 | } |
62 | 64 | ||
63 | // TODO: avoid duplicating apply() code | 65 | // TODO: avoid duplicating apply() code |
64 | void CalFilter::apply(QPtrList<Todo> *eventlist) | 66 | void CalFilter::apply(Q3PtrList<Todo> *eventlist) |
65 | { | 67 | { |
66 | if (!mEnabled) return; | 68 | if (!mEnabled) return; |
67 | Todo *event = eventlist->first(); | 69 | Todo *event = eventlist->first(); |
68 | while(event) { | 70 | while(event) { |
69 | if (!filterTodo(event)) { | 71 | if (!filterTodo(event)) { |
70 | eventlist->remove(); | 72 | eventlist->remove(); |
71 | event = eventlist->current(); | 73 | event = eventlist->current(); |
72 | } else { | 74 | } else { |
73 | event = eventlist->next(); | 75 | event = eventlist->next(); |
74 | } | 76 | } |
75 | } | 77 | } |
76 | 78 | ||
77 | // kdDebug(5800) << "CalFilter::apply() done" << endl; | 79 | // kdDebug(5800) << "CalFilter::apply() done" << endl; |
78 | } | 80 | } |
79 | bool CalFilter::filterCalendarItem(Incidence *in) | 81 | bool CalFilter::filterCalendarItem(Incidence *in) |
80 | { | 82 | { |