summaryrefslogtreecommitdiffabout
path: root/libkcal
authorzautrix <zautrix>2005-11-25 23:24:37 (UTC)
committer zautrix <zautrix>2005-11-25 23:24:37 (UTC)
commit3cd0013c04172b312ee21e80224a3b7734b4d413 (patch) (unidiff)
tree9c5557ecfe874a8a4901a674c5eddcc91f585b0c /libkcal
parent0e18027f386280bf427ef9d0ffec61a5516cebda (diff)
downloadkdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.zip
kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.tar.gz
kdepimpi-3cd0013c04172b312ee21e80224a3b7734b4d413.tar.bz2
sync
Diffstat (limited to 'libkcal') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.cpp2
-rw-r--r--libkcal/calendarlocal.cpp12
-rw-r--r--libkcal/incidencebase.cpp7
-rw-r--r--libkcal/incidencebase.h1
4 files changed, 15 insertions, 7 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp
index b1806ee..8535191 100644
--- a/libkcal/calendar.cpp
+++ b/libkcal/calendar.cpp
@@ -359,49 +359,49 @@ QPtrList<Event> Calendar::events( const QDate &start, const QDate &end,
359 mFilter->apply(&el); 359 mFilter->apply(&el);
360 return el; 360 return el;
361} 361}
362 362
363QPtrList<Event> Calendar::events() 363QPtrList<Event> Calendar::events()
364{ 364{
365 QPtrList<Event> el = rawEvents(); 365 QPtrList<Event> el = rawEvents();
366 mFilter->apply(&el); 366 mFilter->apply(&el);
367 return el; 367 return el;
368} 368}
369void Calendar::addIncidenceBranch(Incidence *i) 369void Calendar::addIncidenceBranch(Incidence *i)
370{ 370{
371 addIncidence( i ); 371 addIncidence( i );
372 Incidence * inc; 372 Incidence * inc;
373 QPtrList<Incidence> Relations = i->relations(); 373 QPtrList<Incidence> Relations = i->relations();
374 for (inc=Relations.first();inc;inc=Relations.next()) { 374 for (inc=Relations.first();inc;inc=Relations.next()) {
375 addIncidenceBranch( inc ); 375 addIncidenceBranch( inc );
376 } 376 }
377} 377}
378 378
379bool Calendar::addIncidence(Incidence *i) 379bool Calendar::addIncidence(Incidence *i)
380{ 380{
381 Incidence::AddVisitor<Calendar> v(this); 381 Incidence::AddVisitor<Calendar> v(this);
382 if ( i->calID() == 0 ) 382 if ( i->calID() == 0 )
383 i->setCalID( mDefaultCalendar ); 383 i->setCalID_block( mDefaultCalendar );
384 i->setCalEnabled( true ); 384 i->setCalEnabled( true );
385 return i->accept(v); 385 return i->accept(v);
386} 386}
387void Calendar::deleteIncidence(Incidence *in) 387void Calendar::deleteIncidence(Incidence *in)
388{ 388{
389 if ( in->typeID() == eventID ) 389 if ( in->typeID() == eventID )
390 deleteEvent( (Event*) in ); 390 deleteEvent( (Event*) in );
391 else if ( in->typeID() == todoID ) 391 else if ( in->typeID() == todoID )
392 deleteTodo( (Todo*) in); 392 deleteTodo( (Todo*) in);
393 else if ( in->typeID() == journalID ) 393 else if ( in->typeID() == journalID )
394 deleteJournal( (Journal*) in ); 394 deleteJournal( (Journal*) in );
395} 395}
396 396
397Incidence* Calendar::incidence( const QString& uid ) 397Incidence* Calendar::incidence( const QString& uid )
398{ 398{
399 Incidence* i; 399 Incidence* i;
400 400
401 if( (i = todo( uid )) != 0 ) 401 if( (i = todo( uid )) != 0 )
402 return i; 402 return i;
403 if( (i = event( uid )) != 0 ) 403 if( (i = event( uid )) != 0 )
404 return i; 404 return i;
405 if( (i = journal( uid )) != 0 ) 405 if( (i = journal( uid )) != 0 )
406 return i; 406 return i;
407 407
diff --git a/libkcal/calendarlocal.cpp b/libkcal/calendarlocal.cpp
index c82ea92..b02f706 100644
--- a/libkcal/calendarlocal.cpp
+++ b/libkcal/calendarlocal.cpp
@@ -128,54 +128,54 @@ Incidence* CalendarLocal::incidenceForUid( const QString& uid , bool doNotCheckD
128bool CalendarLocal::mergeCalendar( Calendar* remote ) 128bool CalendarLocal::mergeCalendar( Calendar* remote )
129{ 129{
130 // 1 look for raw inc in local 130 // 1 look for raw inc in local
131 // if inc not in remote, delete in local 131 // if inc not in remote, delete in local
132 // 2 look for raw inc in remote 132 // 2 look for raw inc in remote
133 // if inc in local, replace it 133 // if inc in local, replace it
134 // if not in local, add it to default calendar 134 // if not in local, add it to default calendar
135 QPtrList<Incidence> localInc = rawIncidences(); 135 QPtrList<Incidence> localInc = rawIncidences();
136 Incidence* inL = localInc.first(); 136 Incidence* inL = localInc.first();
137 while ( inL ) { 137 while ( inL ) {
138 if ( ! inL->isReadOnly () ) 138 if ( ! inL->isReadOnly () )
139 if ( !remote->incidenceForUid( inL->uid(), true )) 139 if ( !remote->incidenceForUid( inL->uid(), true ))
140 deleteIncidence( inL ); 140 deleteIncidence( inL );
141 inL = localInc.next(); 141 inL = localInc.next();
142 } 142 }
143 QPtrList<Incidence> er = remote->rawIncidences(); 143 QPtrList<Incidence> er = remote->rawIncidences();
144 Incidence* inR = er.first(); 144 Incidence* inR = er.first();
145 while ( inR ) { 145 while ( inR ) {
146 inL = incidenceForUid( inR->uid(),false ); 146 inL = incidenceForUid( inR->uid(),false );
147 if ( inL ) { 147 if ( inL ) {
148 if ( ! inL->isReadOnly () || inL->uid().left(15) == QString("last-syncEvent-") ) { 148 if ( ! inL->isReadOnly () || inL->uid().left(15) == QString("last-syncEvent-") ) {
149 int calID = inL->calID(); 149 int calID = inL->calID();
150 deleteIncidence( inL ); 150 deleteIncidence( inL );
151 inL = inR->clone(); 151 inL = inR->clone();
152 inL->setCalID( calID ); 152 inL->setCalID_block( calID );
153 addIncidence( inL ); 153 addIncidence( inL );
154 } 154 }
155 } else { 155 } else {
156 inL = inR->clone(); 156 inL = inR->clone();
157 inL->setCalID( 0 );// add to default cal 157 inL->setCalID_block( 0 );// add to default cal
158 addIncidence( inL ); 158 addIncidence( inL );
159 } 159 }
160 inR = er.next(); 160 inR = er.next();
161 } 161 }
162 return true; 162 return true;
163} 163}
164 164
165 165
166bool CalendarLocal::addCalendarFile( QString name, int id ) 166bool CalendarLocal::addCalendarFile( QString name, int id )
167{ 167{
168 CalendarLocal calendar( timeZoneId() ); 168 CalendarLocal calendar( timeZoneId() );
169 calendar.setDefaultCalendar( id ); 169 calendar.setDefaultCalendar( id );
170 if ( calendar.load( name ) ) { 170 if ( calendar.load( name ) ) {
171 addCalendar( &calendar ); 171 addCalendar( &calendar );
172 return true; 172 return true;
173 } 173 }
174 return false; 174 return false;
175} 175}
176void CalendarLocal::setSyncEventsEnabled() 176void CalendarLocal::setSyncEventsEnabled()
177{ 177{
178 Event * ev; 178 Event * ev;
179 ev = mEventList.first(); 179 ev = mEventList.first();
180 while ( ev ) { 180 while ( ev ) {
181 if ( ev->uid().left(15) == QString("last-syncEvent-") ) 181 if ( ev->uid().left(15) == QString("last-syncEvent-") )
@@ -187,49 +187,49 @@ void CalendarLocal::setSyncEventsReadOnly()
187{ 187{
188 Event * ev; 188 Event * ev;
189 ev = mEventList.first(); 189 ev = mEventList.first();
190 while ( ev ) { 190 while ( ev ) {
191 if ( ev->uid().left(15) == QString("last-syncEvent-") ) { 191 if ( ev->uid().left(15) == QString("last-syncEvent-") ) {
192 ev->setReadOnly( true ); 192 ev->setReadOnly( true );
193 } 193 }
194 ev = mEventList.next(); 194 ev = mEventList.next();
195 } 195 }
196} 196}
197 197
198void CalendarLocal::addCalendar( Calendar* cal ) 198void CalendarLocal::addCalendar( Calendar* cal )
199{ 199{
200 cal->setDontDeleteIncidencesOnClose(); 200 cal->setDontDeleteIncidencesOnClose();
201 setSyncEventsEnabled(); 201 setSyncEventsEnabled();
202 { 202 {
203 QPtrList<Event> EventList = cal->rawEvents(); 203 QPtrList<Event> EventList = cal->rawEvents();
204 QPtrList<Event> el; 204 QPtrList<Event> el;
205 Event * ev = EventList.first(); 205 Event * ev = EventList.first();
206 while ( ev ) { 206 while ( ev ) {
207 if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) { 207 if ( ev->uid().left( 15 ) == QString("last-syncEvent-") ) {
208 Event * se = event( ev->uid() ); 208 Event * se = event( ev->uid() );
209 if ( se ) 209 if ( se )
210 el.append( se ); 210 el.append( se );
211 ev->setCalID( 1 ); 211 ev->setCalID_block( 1 );
212 } 212 }
213 ev->unRegisterObserver( cal ); 213 ev->unRegisterObserver( cal );
214 ev->registerObserver( this ); 214 ev->registerObserver( this );
215 mEventList.append( ev ); 215 mEventList.append( ev );
216 ev = EventList.next(); 216 ev = EventList.next();
217 } 217 }
218 for ( ev = el.first(); ev; ev = el.next() ) { 218 for ( ev = el.first(); ev; ev = el.next() ) {
219 deleteIncidence ( ev ); 219 deleteIncidence ( ev );
220 } 220 }
221 } 221 }
222 { 222 {
223 223
224 QPtrList<Todo> TodoList = cal->rawTodos(); 224 QPtrList<Todo> TodoList = cal->rawTodos();
225 Todo * ev = TodoList.first(); 225 Todo * ev = TodoList.first();
226 while ( ev ) { 226 while ( ev ) {
227 QString rel = ev->relatedToUid(); 227 QString rel = ev->relatedToUid();
228 if ( !rel.isEmpty() ){ 228 if ( !rel.isEmpty() ){
229 ev->setRelatedTo ( 0 ); 229 ev->setRelatedTo ( 0 );
230 ev->setRelatedToUid( rel ); 230 ev->setRelatedToUid( rel );
231 } 231 }
232 ev = TodoList.next(); 232 ev = TodoList.next();
233 } 233 }
234 //TodoList = cal->rawTodos(); 234 //TodoList = cal->rawTodos();
235 ev = TodoList.first(); 235 ev = TodoList.first();
@@ -321,49 +321,49 @@ bool CalendarLocal::addAnniversaryNoDup( Event *event )
321 } 321 }
322 return addEvent( event ); 322 return addEvent( event );
323 323
324} 324}
325bool CalendarLocal::addEventNoDup( Event *event ) 325bool CalendarLocal::addEventNoDup( Event *event )
326{ 326{
327 Event * eve; 327 Event * eve;
328 for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) { 328 for ( eve = mEventList.first(); eve ; eve = mEventList.next() ) {
329 if ( *eve == *event ) { 329 if ( *eve == *event ) {
330 //qDebug("CalendarLocal::Duplicate event found! Not inserted! "); 330 //qDebug("CalendarLocal::Duplicate event found! Not inserted! ");
331 return false; 331 return false;
332 } 332 }
333 } 333 }
334 return addEvent( event ); 334 return addEvent( event );
335} 335}
336 336
337bool CalendarLocal::addEvent( Event *event ) 337bool CalendarLocal::addEvent( Event *event )
338{ 338{
339 insertEvent( event ); 339 insertEvent( event );
340 340
341 event->registerObserver( this ); 341 event->registerObserver( this );
342 342
343 setModified( true ); 343 setModified( true );
344 if ( event->calID() == 0 ) 344 if ( event->calID() == 0 )
345 event->setCalID( mDefaultCalendar ); 345 event->setCalID_block( mDefaultCalendar );
346 event->setCalEnabled( true ); 346 event->setCalEnabled( true );
347 347
348 return true; 348 return true;
349} 349}
350 350
351void CalendarLocal::deleteEvent( Event *event ) 351void CalendarLocal::deleteEvent( Event *event )
352{ 352{
353 clearUndo(event); 353 clearUndo(event);
354 if ( mEventList.removeRef( event ) ) { 354 if ( mEventList.removeRef( event ) ) {
355 setModified( true ); 355 setModified( true );
356 } 356 }
357} 357}
358 358
359 359
360Event *CalendarLocal::event( const QString &uid ) 360Event *CalendarLocal::event( const QString &uid )
361{ 361{
362 Event *event; 362 Event *event;
363 Event *retVal = 0; 363 Event *retVal = 0;
364 for ( event = mEventList.first(); event; event = mEventList.next() ) { 364 for ( event = mEventList.first(); event; event = mEventList.next() ) {
365 if ( event->calEnabled() && event->uid() == uid ) { 365 if ( event->calEnabled() && event->uid() == uid ) {
366 if ( retVal ) { 366 if ( retVal ) {
367 if ( retVal->calID() > event->calID() ) { 367 if ( retVal->calID() > event->calID() ) {
368 retVal = event; 368 retVal = event;
369 } 369 }
@@ -375,49 +375,49 @@ Event *CalendarLocal::event( const QString &uid )
375 return retVal; 375 return retVal;
376} 376}
377bool CalendarLocal::addTodoNoDup( Todo *todo ) 377bool CalendarLocal::addTodoNoDup( Todo *todo )
378{ 378{
379 Todo * eve; 379 Todo * eve;
380 for ( eve = mTodoList.first(); eve ; eve = mTodoList.next() ) { 380 for ( eve = mTodoList.first(); eve ; eve = mTodoList.next() ) {
381 if ( *eve == *todo ) { 381 if ( *eve == *todo ) {
382 //qDebug("duplicate todo found! not inserted! "); 382 //qDebug("duplicate todo found! not inserted! ");
383 return false; 383 return false;
384 } 384 }
385 } 385 }
386 return addTodo( todo ); 386 return addTodo( todo );
387} 387}
388bool CalendarLocal::addTodo( Todo *todo ) 388bool CalendarLocal::addTodo( Todo *todo )
389{ 389{
390 mTodoList.append( todo ); 390 mTodoList.append( todo );
391 391
392 todo->registerObserver( this ); 392 todo->registerObserver( this );
393 393
394 // Set up subtask relations 394 // Set up subtask relations
395 setupRelations( todo ); 395 setupRelations( todo );
396 396
397 setModified( true ); 397 setModified( true );
398 if ( todo->calID() == 0 ) 398 if ( todo->calID() == 0 )
399 todo->setCalID( mDefaultCalendar ); 399 todo->setCalID_block( mDefaultCalendar );
400 todo->setCalEnabled( true ); 400 todo->setCalEnabled( true );
401 return true; 401 return true;
402} 402}
403 403
404void CalendarLocal::deleteTodo( Todo *todo ) 404void CalendarLocal::deleteTodo( Todo *todo )
405{ 405{
406 // Handle orphaned children 406 // Handle orphaned children
407 removeRelations( todo ); 407 removeRelations( todo );
408 clearUndo(todo); 408 clearUndo(todo);
409 409
410 if ( mTodoList.removeRef( todo ) ) { 410 if ( mTodoList.removeRef( todo ) ) {
411 setModified( true ); 411 setModified( true );
412 } 412 }
413} 413}
414 414
415QPtrList<Todo> CalendarLocal::rawTodos() 415QPtrList<Todo> CalendarLocal::rawTodos()
416{ 416{
417 QPtrList<Todo> el; 417 QPtrList<Todo> el;
418 for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() ) 418 for ( Todo *it = mTodoList.first(); it; it = mTodoList.next() )
419 if ( it->calEnabled() ) el.append( it ); 419 if ( it->calEnabled() ) el.append( it );
420 return el; 420 return el;
421} 421}
422Todo *CalendarLocal::todo( QString syncProf, QString id ) 422Todo *CalendarLocal::todo( QString syncProf, QString id )
423{ 423{
@@ -903,49 +903,49 @@ QPtrList<Event> CalendarLocal::rawEvents( const QDate &start, const QDate &end,
903 return eventList; 903 return eventList;
904} 904}
905 905
906QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt ) 906QPtrList<Event> CalendarLocal::rawEventsForDate( const QDateTime &qdt )
907{ 907{
908 return rawEventsForDate( qdt.date() ); 908 return rawEventsForDate( qdt.date() );
909} 909}
910 910
911QPtrList<Event> CalendarLocal::rawEvents() 911QPtrList<Event> CalendarLocal::rawEvents()
912{ 912{
913 QPtrList<Event> el; 913 QPtrList<Event> el;
914 for ( Event *it = mEventList.first(); it; it = mEventList.next() ) 914 for ( Event *it = mEventList.first(); it; it = mEventList.next() )
915 if ( it->calEnabled() ) el.append( it ); 915 if ( it->calEnabled() ) el.append( it );
916 return el; 916 return el;
917} 917}
918 918
919bool CalendarLocal::addJournal(Journal *journal) 919bool CalendarLocal::addJournal(Journal *journal)
920{ 920{
921 mJournalList.append(journal); 921 mJournalList.append(journal);
922 922
923 journal->registerObserver( this ); 923 journal->registerObserver( this );
924 924
925 setModified( true ); 925 setModified( true );
926 if ( journal->calID() == 0 ) 926 if ( journal->calID() == 0 )
927 journal->setCalID( mDefaultCalendar ); 927 journal->setCalID_block( mDefaultCalendar );
928 journal->setCalEnabled( true ); 928 journal->setCalEnabled( true );
929 return true; 929 return true;
930} 930}
931 931
932void CalendarLocal::deleteJournal( Journal *journal ) 932void CalendarLocal::deleteJournal( Journal *journal )
933{ 933{
934 clearUndo(journal); 934 clearUndo(journal);
935 if ( mJournalList.removeRef(journal) ) { 935 if ( mJournalList.removeRef(journal) ) {
936 setModified( true ); 936 setModified( true );
937 } 937 }
938} 938}
939 939
940QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date ) 940QPtrList<Journal> CalendarLocal::journals4Date( const QDate & date )
941{ 941{
942 QPtrList<Journal> el; 942 QPtrList<Journal> el;
943 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 943 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
944 if ( it->calEnabled() && it->dtStart().date() == date) el.append( it ); 944 if ( it->calEnabled() && it->dtStart().date() == date) el.append( it );
945 return el; 945 return el;
946} 946}
947Journal *CalendarLocal::journal( const QDate &date ) 947Journal *CalendarLocal::journal( const QDate &date )
948{ 948{
949// kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl; 949// kdDebug(5800) << "CalendarLocal::journal() " << date.toString() << endl;
950 950
951 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() ) 951 for ( Journal *it = mJournalList.first(); it; it = mJournalList.next() )
diff --git a/libkcal/incidencebase.cpp b/libkcal/incidencebase.cpp
index cfef973..56c0560 100644
--- a/libkcal/incidencebase.cpp
+++ b/libkcal/incidencebase.cpp
@@ -131,48 +131,55 @@ bool KCal::operator==( const IncidenceBase& i1, const IncidenceBase& i2 )
131 i1.doesFloat() == i2.doesFloat() && 131 i1.doesFloat() == i2.doesFloat() &&
132 i1.pilotId() == i2.pilotId() );// && i1.syncStatus() == i2.syncStatus() ); 132 i1.pilotId() == i2.pilotId() );// && i1.syncStatus() == i2.syncStatus() );
133 // no need to compare mObserver 133 // no need to compare mObserver
134} 134}
135 135
136 136
137QDateTime IncidenceBase::getEvenTime( QDateTime dt ) 137QDateTime IncidenceBase::getEvenTime( QDateTime dt )
138{ 138{
139 QTime t = dt.time(); 139 QTime t = dt.time();
140 dt.setTime( QTime (t.hour (), t.minute (), t.second () ) ); 140 dt.setTime( QTime (t.hour (), t.minute (), t.second () ) );
141 return dt; 141 return dt;
142} 142}
143 143
144bool IncidenceBase::isTagged() const 144bool IncidenceBase::isTagged() const
145{ 145{
146 return mIsTagged; 146 return mIsTagged;
147} 147}
148void IncidenceBase::setTagged( bool b) 148void IncidenceBase::setTagged( bool b)
149{ 149{
150 mIsTagged = b; 150 mIsTagged = b;
151} 151}
152void IncidenceBase::setCalID( int id ) 152void IncidenceBase::setCalID( int id )
153{ 153{
154 if ( mCalID > 0 ) { 154 if ( mCalID > 0 ) {
155 updated();
156 }
157 mCalID = id;
158}
159void IncidenceBase::setCalID_block( int id )
160{
161 if ( mCalID > 0 ) {
155 blockLastModified = true; 162 blockLastModified = true;
156 updated(); 163 updated();
157 blockLastModified = false; 164 blockLastModified = false;
158 } 165 }
159 mCalID = id; 166 mCalID = id;
160} 167}
161int IncidenceBase::calID() const 168int IncidenceBase::calID() const
162{ 169{
163 return mCalID; 170 return mCalID;
164} 171}
165void IncidenceBase::setCalEnabled( bool b ) 172void IncidenceBase::setCalEnabled( bool b )
166{ 173{
167 mCalEnabled = b; 174 mCalEnabled = b;
168} 175}
169bool IncidenceBase::calEnabled() const 176bool IncidenceBase::calEnabled() const
170{ 177{
171 return mCalEnabled; 178 return mCalEnabled;
172} 179}
173 180
174void IncidenceBase::setAlarmEnabled( bool b ) 181void IncidenceBase::setAlarmEnabled( bool b )
175{ 182{
176 mAlarmEnabled = b; 183 mAlarmEnabled = b;
177} 184}
178bool IncidenceBase::alarmEnabled() const 185bool IncidenceBase::alarmEnabled() const
diff --git a/libkcal/incidencebase.h b/libkcal/incidencebase.h
index 444d4c4..3edc03b 100644
--- a/libkcal/incidencebase.h
+++ b/libkcal/incidencebase.h
@@ -122,48 +122,49 @@ class IncidenceBase : public CustomProperties
122 /** Set synchronisation satus. */ 122 /** Set synchronisation satus. */
123 void setSyncStatus(int stat); 123 void setSyncStatus(int stat);
124 /** Return synchronisation status. */ 124 /** Return synchronisation status. */
125 int syncStatus() const; 125 int syncStatus() const;
126 126
127 /** Set Pilot Id. */ 127 /** Set Pilot Id. */
128 void setPilotId(int id); 128 void setPilotId(int id);
129 /** Return Pilot Id. */ 129 /** Return Pilot Id. */
130 int pilotId() const; 130 int pilotId() const;
131 131
132 void setTempSyncStat(int id); 132 void setTempSyncStat(int id);
133 int tempSyncStat() const; 133 int tempSyncStat() const;
134 void setIDStr( const QString & ); 134 void setIDStr( const QString & );
135 QString IDStr() const; 135 QString IDStr() const;
136 void setID( const QString &, const QString & ); 136 void setID( const QString &, const QString & );
137 QString getID( const QString & ); 137 QString getID( const QString & );
138 void setCsum( const QString &, const QString & ); 138 void setCsum( const QString &, const QString & );
139 QString getCsum( const QString & ); 139 QString getCsum( const QString & );
140 void removeID(const QString &); 140 void removeID(const QString &);
141 141
142 void registerObserver( Observer * ); 142 void registerObserver( Observer * );
143 void unRegisterObserver( Observer * ); 143 void unRegisterObserver( Observer * );
144 void updated(); 144 void updated();
145 void setCalID( int id ); 145 void setCalID( int id );
146 void setCalID_block( int id );
146 int calID() const; 147 int calID() const;
147 void setCalEnabled( bool ); 148 void setCalEnabled( bool );
148 bool calEnabled() const; 149 bool calEnabled() const;
149 void setAlarmEnabled( bool ); 150 void setAlarmEnabled( bool );
150 bool alarmEnabled() const; 151 bool alarmEnabled() const;
151 bool isTagged() const; 152 bool isTagged() const;
152 void setTagged( bool ); 153 void setTagged( bool );
153 virtual void setLastModifiedSubInvalid(); 154 virtual void setLastModifiedSubInvalid();
154 protected: 155 protected:
155 bool blockLastModified; 156 bool blockLastModified;
156 bool mIsTagged; 157 bool mIsTagged;
157 QDateTime mDtStart; 158 QDateTime mDtStart;
158 bool mReadOnly; 159 bool mReadOnly;
159 QDateTime getEvenTime( QDateTime ); 160 QDateTime getEvenTime( QDateTime );
160 161
161 private: 162 private:
162 // base components 163 // base components
163 QString mOrganizer; 164 QString mOrganizer;
164 QString mLastModifiedKey; 165 QString mLastModifiedKey;
165 QString mUid; 166 QString mUid;
166 int mCalID; 167 int mCalID;
167 bool mCalEnabled; 168 bool mCalEnabled;
168 bool mAlarmEnabled; 169 bool mAlarmEnabled;
169 QDateTime mLastModified; 170 QDateTime mLastModified;