author | zecke <zecke> | 2002-11-30 11:28:47 (UTC) |
---|---|---|
committer | zecke <zecke> | 2002-11-30 11:28:47 (UTC) |
commit | 9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d (patch) (unidiff) | |
tree | 896dd858dc2ec2f0b7e1b265cae66ccceecc82da /libopie/pim/opimnotifymanager.cpp | |
parent | 599c58c6ab2ab936890cbbfa4e6299493c141f8a (diff) | |
download | opie-9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d.zip opie-9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d.tar.gz opie-9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d.tar.bz2 |
More infrastructure
ORecur has now the nextOccurence function
exceptions
We've now Notifers like Alarms and DatebookEntries
we may add to execute applications...
AppName replaced with service cause it is a service
Add rtti to OPimRecord as a static function
This is used inside the BackEnd classes to static_cast...
added removeAllCompleted to the todobackends...
add a common Opie PIM mainwindow which takes care of some simple
scripting enchangements..
much more
Diffstat (limited to 'libopie/pim/opimnotifymanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libopie/pim/opimnotifymanager.cpp | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/libopie/pim/opimnotifymanager.cpp b/libopie/pim/opimnotifymanager.cpp new file mode 100644 index 0000000..be4a1c2 --- a/dev/null +++ b/libopie/pim/opimnotifymanager.cpp | |||
@@ -0,0 +1,69 @@ | |||
1 | #include "opimnotifymanager.h" | ||
2 | |||
3 | OPimNotifyManager::OPimNotifyManager( const Reminders& rem, const Alarms& al) | ||
4 | : m_rem( rem ), m_al( al ) | ||
5 | {} | ||
6 | OPimNotifyManager::~OPimNotifyManager() { | ||
7 | } | ||
8 | /* use static_cast and type instead of dynamic... */ | ||
9 | void OPimNotifyManager::add( const OPimNotify& noti) { | ||
10 | if ( noti.type() == QString::fromLatin1("OPimReminder") ) { | ||
11 | const OPimReminder& rem = static_cast<const OPimReminder&>(noti); | ||
12 | m_rem.append( rem ); | ||
13 | }else if ( noti.type() == QString::fromLatin1("OPimAlarm") ) { | ||
14 | const OPimAlarm& al = static_cast<const OPimAlarm&>(noti); | ||
15 | m_al.append( al ); | ||
16 | } | ||
17 | } | ||
18 | void OPimNotifyManager::remove( const OPimNotify& noti) { | ||
19 | if ( noti.type() == QString::fromLatin1("OPimReminder") ) { | ||
20 | const OPimReminder& rem = static_cast<const OPimReminder&>(noti); | ||
21 | m_rem.remove( rem ); | ||
22 | }else if ( noti.type() == QString::fromLatin1("OPimAlarm") ) { | ||
23 | const OPimAlarm& al = static_cast<const OPimAlarm&>(noti); | ||
24 | m_al.remove( al ); | ||
25 | } | ||
26 | } | ||
27 | void OPimNotifyManager::replace( const OPimNotify& noti) { | ||
28 | if ( noti.type() == QString::fromLatin1("OPimReminder") ) { | ||
29 | const OPimReminder& rem = static_cast<const OPimReminder&>(noti); | ||
30 | m_rem.remove( rem ); | ||
31 | m_rem.append( rem ); | ||
32 | }else if ( noti.type() == QString::fromLatin1("OPimAlarm") ) { | ||
33 | const OPimAlarm& al = static_cast<const OPimAlarm&>(noti); | ||
34 | m_al.remove( al ); | ||
35 | m_al.append( al ); | ||
36 | } | ||
37 | } | ||
38 | OPimNotifyManager::Reminders OPimNotifyManager::reminders()const { | ||
39 | return m_rem; | ||
40 | } | ||
41 | OPimNotifyManager::Alarms OPimNotifyManager::alarms()const { | ||
42 | return m_al; | ||
43 | } | ||
44 | void OPimNotifyManager::setAlarms( const Alarms& al) { | ||
45 | m_al = al; | ||
46 | } | ||
47 | void OPimNotifyManager::setReminders( const Reminders& rem) { | ||
48 | m_rem = rem; | ||
49 | } | ||
50 | /* FIXME!!! */ | ||
51 | /** | ||
52 | * The idea is to check if the provider for our service | ||
53 | * is online | ||
54 | * if it is we will use QCOP | ||
55 | * if not the Factory to get the backend... | ||
56 | * Qtopia1.6 services would be kewl to have here.... | ||
57 | */ | ||
58 | void OPimNotifyManager::registerNotify( const OPimNotify& ) { | ||
59 | |||
60 | } | ||
61 | /* FIXME!!! */ | ||
62 | /** | ||
63 | * same as above... | ||
64 | * Also implement Url model | ||
65 | * have a MainWindow.... | ||
66 | */ | ||
67 | void OPimNotifyManager::deregister( const OPimNotify& ) { | ||
68 | |||
69 | } | ||