From 9b8b30fa6cbdf1424b29cde21fae112e8bf96e6d Mon Sep 17 00:00:00 2001 From: zecke Date: Sat, 30 Nov 2002 11:28:47 +0000 Subject: 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 --- (limited to 'libopie/pim/otodoaccessxml.cpp') diff --git a/libopie/pim/otodoaccessxml.cpp b/libopie/pim/otodoaccessxml.cpp index c1682c6..b2dfe80 100644 --- a/libopie/pim/otodoaccessxml.cpp +++ b/libopie/pim/otodoaccessxml.cpp @@ -28,7 +28,7 @@ bool OTodoAccessXML::load() { /* * UPDATE dict if you change anything!!! */ - QAsciiDict dict(15); + QAsciiDict 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* 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 OTodoAccessXML::sorted( bool asc, int sortOrder, qWarning("array count = %d %d", array.count(), vector.count() ); return array; }; +void OTodoAccessXML::removeAllCompleted() { + for ( QMap::Iterator it = m_events.begin(); it != m_events.end(); ++it ) { + if ( (*it).isCompleted() ) + m_events.remove( it ); + } +} -- cgit v0.9.0.2