summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/otodo.cpp
Unidiff
Diffstat (limited to 'libopie2/opiepim/otodo.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/otodo.cpp44
1 files changed, 37 insertions, 7 deletions
diff --git a/libopie2/opiepim/otodo.cpp b/libopie2/opiepim/otodo.cpp
index 189bf94..3eb0026 100644
--- a/libopie2/opiepim/otodo.cpp
+++ b/libopie2/opiepim/otodo.cpp
@@ -1,46 +1,74 @@
1 1/*
2 This file is part of the Opie Project
3 Copyright (C) The Main Author <main-author@whereever.org>
4 =. Copyright (C) The Opie Team <opie-devel@handhelds.org>
5 .=l.
6 .>+-=
7 _;:, .> :=|. This program is free software; you can
8.> <`_, > . <= redistribute it and/or modify it under
9:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
10.="- .-=="i, .._ License as published by the Free Software
11 - . .-<_> .<> Foundation; either version 2 of the License,
12 ._= =} : or (at your option) any later version.
13 .%`+i> _;_.
14 .i_,=:_. -<s. This program is distributed in the hope that
15 + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
16 : .. .:, . . . without even the implied warranty of
17 =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
18 _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
19..}^=.= = ; Library General Public License for more
20++= -. .` .: details.
21 : = ...= . :.=-
22 -. .:....=;==+<; You should have received a copy of the GNU
23 -_. . . )=. = Library General Public License along with
24 -- :-=` this library; see the file COPYING.LIB.
25 If not, write to the Free Software Foundation,
26 Inc., 59 Temple Place - Suite 330,
27 Boston, MA 02111-1307, USA.
28*/
2#include <qobject.h> 29#include <qobject.h>
3#include <qshared.h> 30#include <qshared.h>
4 31
5 32
6 33
7#include <qpe/palmtopuidgen.h> 34#include <qpe/palmtopuidgen.h>
8#include <qpe/stringutil.h> 35#include <qpe/stringutil.h>
9#include <qpe/palmtoprecord.h> 36#include <qpe/palmtoprecord.h>
10#include <qpe/stringutil.h> 37#include <qpe/stringutil.h>
11#include <qpe/categories.h> 38#include <qpe/categories.h>
12#include <qpe/categoryselect.h> 39#include <qpe/categoryselect.h>
13 40
14 41
15#include "opimstate.h" 42#include <opie2/opimstate.h>
16#include "orecur.h" 43#include <opie2/orecur.h>
17#include "opimmaintainer.h" 44#include <opie2/opimmaintainer.h>
18#include "opimnotifymanager.h" 45#include <opie2/opimnotifymanager.h>
19#include "opimresolver.h" 46#include <opie2/opimresolver.h>
20 47
21#include "otodo.h" 48#include <opie2/otodo.h>
22 49
50namespace Opie {
23 51
24struct OTodo::OTodoData : public QShared { 52struct OTodo::OTodoData : public QShared {
25 OTodoData() : QShared() { 53 OTodoData() : QShared() {
26 recur = 0; 54 recur = 0;
27 state = 0; 55 state = 0;
28 maintainer = 0; 56 maintainer = 0;
29 notifiers = 0; 57 notifiers = 0;
30 }; 58 };
31 ~OTodoData() { 59 ~OTodoData() {
32 delete recur; 60 delete recur;
33 delete maintainer; 61 delete maintainer;
34 delete notifiers; 62 delete notifiers;
35 } 63 }
36 64
37 QDate date; 65 QDate date;
38 bool isCompleted:1; 66 bool isCompleted:1;
39 bool hasDate:1; 67 bool hasDate:1;
40 int priority; 68 int priority;
41 QString desc; 69 QString desc;
42 QString sum; 70 QString sum;
43 QMap<QString, QString> extra; 71 QMap<QString, QString> extra;
44 ushort prog; 72 ushort prog;
45 OPimState *state; 73 OPimState *state;
46 ORecur *recur; 74 ORecur *recur;
@@ -497,24 +525,26 @@ void OTodo::copy( OTodoData* src, OTodoData* dest ) {
497 dest->state = new OPimState( *src->state ); 525 dest->state = new OPimState( *src->state );
498 526
499 if (src->recur ) 527 if (src->recur )
500 dest->recur = new ORecur( *src->recur ); 528 dest->recur = new ORecur( *src->recur );
501 529
502 if (src->maintainer ) 530 if (src->maintainer )
503 dest->maintainer = new OPimMaintainer( *src->maintainer ) 531 dest->maintainer = new OPimMaintainer( *src->maintainer )
504 ; 532 ;
505 dest->start = src->start; 533 dest->start = src->start;
506 dest->completed = src->completed; 534 dest->completed = src->completed;
507 535
508 if (src->notifiers ) 536 if (src->notifiers )
509 dest->notifiers = new OPimNotifyManager( *src->notifiers ); 537 dest->notifiers = new OPimNotifyManager( *src->notifiers );
510} 538}
511QString OTodo::type() const { 539QString OTodo::type() const {
512 return QString::fromLatin1("OTodo"); 540 return QString::fromLatin1("OTodo");
513} 541}
514QString OTodo::recordField(int /*id*/ )const { 542QString OTodo::recordField(int /*id*/ )const {
515 return QString::null; 543 return QString::null;
516} 544}
517 545
518int OTodo::rtti(){ 546int OTodo::rtti(){
519 return OPimResolver::TodoList; 547 return OPimResolver::TodoList;
520} 548}
549
550}