From 17b25691f0332e648dd1d800e89ccf4e1da8955d Mon Sep 17 00:00:00 2001 From: zautrix Date: Tue, 07 Dec 2004 09:55:57 +0000 Subject: some kopi usebility fixes --- (limited to 'libkcal/incidence.cpp') diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp index 5a9ef0e..28402ae 100644 --- a/libkcal/incidence.cpp +++ b/libkcal/incidence.cpp @@ -173,6 +173,20 @@ bool KCal::operator==( const Incidence& i1, const Incidence& i2 ) stringCompare( i1.location(), i2.location() ); } +Incidence* Incidence::recreateCloneException( QDate d ) +{ + Incidence* newInc = clone(); + newInc->recreate(); + if ( doesRecur() ) { + addExDate( d ); + newInc->recurrence()->unsetRecurs(); + int len = dtStart().secsTo( ((Event*)this)->dtEnd()); + QTime tim = dtStart().time(); + newInc->setDtStart( QDateTime(d, tim) ); + ((Event*)newInc)->setDtEnd( newInc->dtStart().addSecs( len ) ); + } + return newInc; +} void Incidence::recreate() { -- cgit v0.9.0.2