summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/core
authoreilers <eilers>2003-12-08 15:18:10 (UTC)
committer eilers <eilers>2003-12-08 15:18:10 (UTC)
commit6974a4bbdc674a2a5d41d801f80035a183faedb5 (patch) (unidiff)
tree09a719ef263047e92ffb866da13168b7f7d41f23 /libopie2/opiepim/core
parent7f2f736597490fd1592d7ed1f40e4abf824673c0 (diff)
downloadopie-6974a4bbdc674a2a5d41d801f80035a183faedb5.zip
opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.tar.gz
opie-6974a4bbdc674a2a5d41d801f80035a183faedb5.tar.bz2
Committing unfinished sql implementation before merging to libopie2 starts..
Diffstat (limited to 'libopie2/opiepim/core') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/core/orecur.cpp8
-rw-r--r--libopie2/opiepim/core/orecur.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/orecur.cpp b/libopie2/opiepim/core/orecur.cpp
index 8c9ad46..f46f22e 100644
--- a/libopie2/opiepim/core/orecur.cpp
+++ b/libopie2/opiepim/core/orecur.cpp
@@ -29,16 +29,24 @@ struct ORecur::Data : public QShared {
29 ExceptionList list; 29 ExceptionList list;
30 QDate start; 30 QDate start;
31}; 31};
32 32
33 33
34ORecur::ORecur() { 34ORecur::ORecur() {
35 data = new Data; 35 data = new Data;
36} 36}
37
38ORecur::ORecur( const QMap<int, QString>& map )
39{
40 ORecur();
41 fromMap( map );
42}
43
44
37ORecur::ORecur( const ORecur& rec) 45ORecur::ORecur( const ORecur& rec)
38 : data( rec.data ) 46 : data( rec.data )
39{ 47{
40 data->ref(); 48 data->ref();
41} 49}
42ORecur::~ORecur() { 50ORecur::~ORecur() {
43 if ( data->deref() ) { 51 if ( data->deref() ) {
44 delete data; 52 delete data;
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h
index 47901b0..7750c12 100644
--- a/libopie2/opiepim/core/orecur.h
+++ b/libopie2/opiepim/core/orecur.h
@@ -17,16 +17,17 @@ public:
17 enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay, 17 enum RepeatType{ NoRepeat = -1, Daily, Weekly, MonthlyDay,
18 MonthlyDate, Yearly }; 18 MonthlyDate, Yearly };
19 enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08, 19 enum Days { MON = 0x01, TUE = 0x02, WED = 0x04, THU = 0x08,
20 FRI = 0x10, SAT = 0x20, SUN = 0x40 }; 20 FRI = 0x10, SAT = 0x20, SUN = 0x40 };
21 enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate, 21 enum Fields{ RType = 0, RWeekdays, RPosition, RFreq, RHasEndDate,
22 EndDate, Created, Exceptions }; 22 EndDate, Created, Exceptions };
23 23
24 ORecur(); 24 ORecur();
25 ORecur( const QMap<int, QString>& map );
25 ORecur( const ORecur& ); 26 ORecur( const ORecur& );
26 ~ORecur(); 27 ~ORecur();
27 28
28 ORecur &operator=( const ORecur& ); 29 ORecur &operator=( const ORecur& );
29 bool operator==(const ORecur& )const; 30 bool operator==(const ORecur& )const;
30 31
31 bool doesRecur()const; 32 bool doesRecur()const;
32 /* if it recurrs on that day */ 33 /* if it recurrs on that day */