-rw-r--r-- | libopie2/opiepim/core/ocontactaccess.h | 14 | ||||
-rw-r--r-- | libopie2/opiepim/core/odatebookaccess.cpp | 19 | ||||
-rw-r--r-- | libopie2/opiepim/core/odatebookaccess.h | 9 | ||||
-rw-r--r-- | libopie2/opiepim/core/otimezone.cpp | 11 |
4 files changed, 46 insertions, 7 deletions
diff --git a/libopie2/opiepim/core/ocontactaccess.h b/libopie2/opiepim/core/ocontactaccess.h index 9b0a719..bd6da40 100644 --- a/libopie2/opiepim/core/ocontactaccess.h +++ b/libopie2/opiepim/core/ocontactaccess.h | |||
@@ -18,4 +18,16 @@ | |||
18 | * History: | 18 | * History: |
19 | * $Log$ | 19 | * $Log$ |
20 | * Revision 1.10 2003/12/22 10:19:26 eilers | ||
21 | * Finishing implementation of sql-backend for datebook. But I have to | ||
22 | * port the PIM datebook application to use it, before I could debug the | ||
23 | * whole stuff. | ||
24 | * Thus, PIM-Database backend is finished, but highly experimental. And some | ||
25 | * parts are still generic. For instance, the "queryByExample()" methods are | ||
26 | * not (or not fully) implemented. Todo: custom-entries not stored. | ||
27 | * The big show stopper: matchRegExp() (needed by OpieSearch) needs regular | ||
28 | * expression search in the database, which is not supported by sqlite ! | ||
29 | * Therefore we need either an extended sqlite or a workaround which would | ||
30 | * be very slow and memory consuming.. | ||
31 | * | ||
20 | * Revision 1.9 2003/08/01 12:30:16 eilers | 32 | * Revision 1.9 2003/08/01 12:30:16 eilers |
21 | * Merging changes from BRANCH_1_0 to HEAD | 33 | * Merging changes from BRANCH_1_0 to HEAD |
@@ -79,5 +91,5 @@ | |||
79 | * This class is used to access the Contacts on a system. This class as any OPIE PIM | 91 | * This class is used to access the Contacts on a system. This class as any OPIE PIM |
80 | * class is backend independent. | 92 | * class is backend independent. |
81 | 93 | * @author Stefan Eilers, Holger Freyther | |
82 | * @see OPimAccessTemplate | 94 | * @see OPimAccessTemplate |
83 | */ | 95 | */ |
diff --git a/libopie2/opiepim/core/odatebookaccess.cpp b/libopie2/opiepim/core/odatebookaccess.cpp index a3661a3..82934f9 100644 --- a/libopie2/opiepim/core/odatebookaccess.cpp +++ b/libopie2/opiepim/core/odatebookaccess.cpp | |||
@@ -57,5 +57,5 @@ ODateBookAccess::List ODateBookAccess::nonRepeats()const { | |||
57 | */ | 57 | */ |
58 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) { | 58 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, const QDate& to ) { |
59 | return m_backEnd->effecticeEvents( from, to ); | 59 | return m_backEnd->effectiveEvents( from, to ); |
60 | } | 60 | } |
61 | /** | 61 | /** |
@@ -63,4 +63,19 @@ OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDate& from, | |||
63 | */ | 63 | */ |
64 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) { | 64 | OEffectiveEvent::ValueList ODateBookAccess::effectiveEvents( const QDateTime& start ) { |
65 | return m_backEnd->effecticeEvents( start ); | 65 | return m_backEnd->effectiveEvents( start ); |
66 | } | ||
67 | |||
68 | /** | ||
69 | * @return non repeating dates in the time span between from and to | ||
70 | * @param from Include all events from... | ||
71 | * @param to Include all events to... | ||
72 | */ | ||
73 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) { | ||
74 | return m_backEnd->effectiveNonRepeatingEvents( from, to ); | ||
75 | } | ||
76 | /** | ||
77 | * @return all non repeating events at a given datetime | ||
78 | */ | ||
79 | OEffectiveEvent::ValueList ODateBookAccess::effectiveNonRepeatingEvents( const QDateTime& start ) { | ||
80 | return m_backEnd->effectiveNonRepeatingEvents( start ); | ||
66 | } | 81 | } |
diff --git a/libopie2/opiepim/core/odatebookaccess.h b/libopie2/opiepim/core/odatebookaccess.h index 7c7a63f..62196da 100644 --- a/libopie2/opiepim/core/odatebookaccess.h +++ b/libopie2/opiepim/core/odatebookaccess.h | |||
@@ -14,5 +14,5 @@ | |||
14 | * destructing and creating the object | 14 | * destructing and creating the object |
15 | * | 15 | * |
16 | * @author Holger Freyther | 16 | * @author Holger Freyther, Stefan Eilers |
17 | */ | 17 | */ |
18 | class ODateBookAccess : public OPimAccessTemplate<OEvent> { | 18 | class ODateBookAccess : public OPimAccessTemplate<OEvent> { |
@@ -30,6 +30,9 @@ public: | |||
30 | List nonRepeats()const; | 30 | List nonRepeats()const; |
31 | 31 | ||
32 | OEffectiveEvent::ValueList effectiveEvents( const QDate& from, const QDate& to ); | 32 | /* return non repeating events (from,to) */ |
33 | OEffectiveEvent::ValueList effectiveEvents( const QDateTime& start ); | 33 | OEffectiveEvent::ValueList effectiveEvents( const QDate& from, const QDate& to ) const; |
34 | OEffectiveEvent::ValueList effectiveEvents( const QDateTime& start ) const; | ||
35 | OEffectiveEvent::ValueList effectiveNonRepeatingEvents( const QDate& from, const QDate& to ) const; | ||
36 | OEffectiveEvent::ValueList effectiveNonRepeatingEvents( const QDateTime& start ) const; | ||
34 | 37 | ||
35 | private: | 38 | private: |
diff --git a/libopie2/opiepim/core/otimezone.cpp b/libopie2/opiepim/core/otimezone.cpp index b2bd3aa..34659c3 100644 --- a/libopie2/opiepim/core/otimezone.cpp +++ b/libopie2/opiepim/core/otimezone.cpp | |||
@@ -17,4 +17,5 @@ namespace { | |||
17 | QDateTime utcTime( time_t t, const QString& zone) { | 17 | QDateTime utcTime( time_t t, const QString& zone) { |
18 | QCString org = ::getenv( "TZ" ); | 18 | QCString org = ::getenv( "TZ" ); |
19 | #ifndef Q_OS_MACX // Following line causes bus errors on Mac | ||
19 | ::setenv( "TZ", zone.latin1(), true ); | 20 | ::setenv( "TZ", zone.latin1(), true ); |
20 | ::tzset(); | 21 | ::tzset(); |
@@ -22,4 +23,8 @@ namespace { | |||
22 | tm* broken = ::localtime( &t ); | 23 | tm* broken = ::localtime( &t ); |
23 | ::setenv( "TZ", org, true ); | 24 | ::setenv( "TZ", org, true ); |
25 | #else | ||
26 | #warning "Need a replacement for MacOSX!!" | ||
27 | tm* broken = ::localtime( &t ); | ||
28 | #endif | ||
24 | 29 | ||
25 | QDateTime ret; | 30 | QDateTime ret; |
@@ -42,4 +47,5 @@ namespace { | |||
42 | 47 | ||
43 | QCString org = ::getenv( "TZ" ); | 48 | QCString org = ::getenv( "TZ" ); |
49 | #ifndef Q_OS_MACX // Following line causes bus errors on Mac | ||
44 | ::setenv( "TZ", str.latin1(), true ); | 50 | ::setenv( "TZ", str.latin1(), true ); |
45 | ::tzset(); | 51 | ::tzset(); |
@@ -47,5 +53,8 @@ namespace { | |||
47 | time_t ti = ::mktime( &broken ); | 53 | time_t ti = ::mktime( &broken ); |
48 | ::setenv( "TZ", org, true ); | 54 | ::setenv( "TZ", org, true ); |
49 | 55 | #else | |
56 | #warning "Need a replacement for MacOSX!!" | ||
57 | time_t ti = ::mktime( &broken ); | ||
58 | #endif | ||
50 | return ti; | 59 | return ti; |
51 | } | 60 | } |