author | eilers <eilers> | 2004-01-16 13:37:03 (UTC) |
---|---|---|
committer | eilers <eilers> | 2004-01-16 13:37:03 (UTC) |
commit | 839775ea257f2c9be752a77c41a09416469df591 (patch) (unidiff) | |
tree | d856530aad005f66adae3634bd384d3d02bb6c95 /libopie2/opiepim | |
parent | f7936b488e81f8706c4ea900979f2ea70734cfe9 (diff) | |
download | opie-839775ea257f2c9be752a77c41a09416469df591.zip opie-839775ea257f2c9be752a77c41a09416469df591.tar.gz opie-839775ea257f2c9be752a77c41a09416469df591.tar.bz2 |
Some changes to handle alarms for datebook-sql db..
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.cpp | 16 | ||||
-rw-r--r-- | libopie2/opiepim/core/opimnotifymanager.h | 15 | ||||
-rw-r--r-- | libopie2/opiepim/core/orecur.h | 5 |
3 files changed, 36 insertions, 0 deletions
diff --git a/libopie2/opiepim/core/opimnotifymanager.cpp b/libopie2/opiepim/core/opimnotifymanager.cpp index 53ad4c3..d6f0ead 100644 --- a/libopie2/opiepim/core/opimnotifymanager.cpp +++ b/libopie2/opiepim/core/opimnotifymanager.cpp | |||
@@ -47,2 +47,18 @@ OPimNotifyManager::Alarms OPimNotifyManager::alarms()const { | |||
47 | } | 47 | } |
48 | OPimAlarm OPimNotifyManager::alarmAtDateTime( const QDateTime& when, bool& found ) const { | ||
49 | Alarms::ConstIterator it; | ||
50 | found = true; | ||
51 | |||
52 | for ( it = m_al.begin(); it != m_al.end(); ++it ){ | ||
53 | if ( (*it).dateTime() == when ) | ||
54 | return (*it); | ||
55 | } | ||
56 | |||
57 | // Fall through if nothing could be found | ||
58 | found = false; | ||
59 | OPimAlarm empty; | ||
60 | return empty; | ||
61 | } | ||
62 | |||
63 | |||
48 | void OPimNotifyManager::setAlarms( const Alarms& al) { | 64 | void OPimNotifyManager::setAlarms( const Alarms& al) { |
diff --git a/libopie2/opiepim/core/opimnotifymanager.h b/libopie2/opiepim/core/opimnotifymanager.h index 48410e7..f3c22f9 100644 --- a/libopie2/opiepim/core/opimnotifymanager.h +++ b/libopie2/opiepim/core/opimnotifymanager.h | |||
@@ -24,4 +24,19 @@ public: | |||
24 | Reminders reminders()const; | 24 | Reminders reminders()const; |
25 | |||
26 | /** | ||
27 | * Return | ||
28 | */ | ||
25 | Alarms alarms()const; | 29 | Alarms alarms()const; |
26 | 30 | ||
31 | /** | ||
32 | * Return alarm at DateTime "when". If more than one is registered at this | ||
33 | * DateTime, the first one is returned. | ||
34 | * If none was found, an empty Alarm is returned. | ||
35 | * @param when The date and time of the returned alarm | ||
36 | * @param found Returns true if anything was found. | ||
37 | * @return Returns the found alarm at given DateTime. It is empty if found is false | ||
38 | * (nothing could be found at given date and time) | ||
39 | */ | ||
40 | OPimAlarm alarmAtDateTime( const QDateTime& when, bool& found ) const; | ||
41 | |||
27 | void setAlarms( const Alarms& ); | 42 | void setAlarms( const Alarms& ); |
diff --git a/libopie2/opiepim/core/orecur.h b/libopie2/opiepim/core/orecur.h index 7750c12..d7ecd90 100644 --- a/libopie2/opiepim/core/orecur.h +++ b/libopie2/opiepim/core/orecur.h | |||
@@ -13,2 +13,7 @@ | |||
13 | 13 | ||
14 | |||
15 | /** | ||
16 | * Class to handle Recurrencies.. | ||
17 | */ | ||
18 | |||
14 | class ORecur { | 19 | class ORecur { |