summaryrefslogtreecommitdiff
path: root/libopie2/opiepim/backend/otodoaccessxml.cpp
authorzecke <zecke>2002-11-30 11:28:47 (UTC)
committer zecke <zecke>2002-11-30 11:28:47 (UTC)
commit9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d (patch) (side-by-side diff)
tree896dd858dc2ec2f0b7e1b265cae66ccceecc82da /libopie2/opiepim/backend/otodoaccessxml.cpp
parent599c58c6ab2ab936890cbbfa4e6299493c141f8a (diff)
downloadopie-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 'libopie2/opiepim/backend/otodoaccessxml.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiepim/backend/otodoaccessxml.cpp27
1 files changed, 14 insertions, 13 deletions
diff --git a/libopie2/opiepim/backend/otodoaccessxml.cpp b/libopie2/opiepim/backend/otodoaccessxml.cpp
index c1682c6..b2dfe80 100644
--- a/libopie2/opiepim/backend/otodoaccessxml.cpp
+++ b/libopie2/opiepim/backend/otodoaccessxml.cpp
@@ -28,7 +28,7 @@ bool OTodoAccessXML::load() {
/*
* UPDATE dict if you change anything!!!
*/
- QAsciiDict<int> dict(15);
+ QAsciiDict<int> dict(21);
dict.setAutoDelete( TRUE );
dict.insert("Categories" , new int(OTodo::Category) );
dict.insert("Uid" , new int(OTodo::Uid) );
@@ -43,11 +43,15 @@ bool OTodoAccessXML::load() {
dict.insert("Progress" , new int(OTodo::Progress) );
dict.insert("Completed", new int(OTodo::Completed) );
dict.insert("CrossReference", new int(OTodo::CrossReference) );
- dict.insert("HasAlarmDateTime",new int(OTodo::HasAlarmDateTime) );
- dict.insert("AlarmDateTime", new int(OTodo::AlarmDateTime) );
+ dict.insert("State", new int(OTodo::State) );
+ dict.insert("Recurrence", new int(OTodo::Recurrence) );
+ dict.insert("Alarms", new int(OTodo::Alarms) );
+ dict.insert("Reminders", new int(OTodo::Reminders) );
+ dict.insert("Notifiers", new int(OTodo::Notifiers) );
+ dict.insert("Maintainer", new int(OTodo::Maintainer) );
// here the custom XML parser from TT it's GPL
- // but we want to push that to TT.....
+ // but we want to push OpiePIM... to TT.....
QFile f(m_file );
if (!f.open(IO_ReadOnly) )
return false;
@@ -336,14 +340,6 @@ void OTodoAccessXML::todo( QAsciiDict<int>* dict, OTodo& ev,
}
break;
}
- case OTodo::HasAlarmDateTime:
- ev.setHasAlarmDateTime( val.toInt() );
- break;
- case OTodo::AlarmDateTime: {
- /* this sounds better ;) zecke */
- ev.setAlarmDateTime( TimeConversion::fromISO8601( val.local8Bit() ) );
- break;
- }
default:
break;
}
@@ -383,7 +379,6 @@ QString OTodoAccessXML::toString( const OTodo& ev )const {
*/
// cross refernce
- str += "AlarmDateTime=\"" + TimeConversion::toISO8601( ev.alarmDateTime() ) + "\" ";
return str;
}
@@ -616,3 +611,9 @@ QArray<int> OTodoAccessXML::sorted( bool asc, int sortOrder,
qWarning("array count = %d %d", array.count(), vector.count() );
return array;
};
+void OTodoAccessXML::removeAllCompleted() {
+ for ( QMap<int, OTodo>::Iterator it = m_events.begin(); it != m_events.end(); ++it ) {
+ if ( (*it).isCompleted() )
+ m_events.remove( it );
+ }
+}