summaryrefslogtreecommitdiffabout
path: root/libkcal/incidence.cpp
Side-by-side diff
Diffstat (limited to 'libkcal/incidence.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libkcal/incidence.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/libkcal/incidence.cpp b/libkcal/incidence.cpp
index d9bda64..56c9801 100644
--- a/libkcal/incidence.cpp
+++ b/libkcal/incidence.cpp
@@ -513,48 +513,53 @@ void Incidence::removeAlarm(Alarm *alarm)
mAlarms.removeRef(alarm);
updated();
}
void Incidence::clearAlarms()
{
mAlarms.clear();
updated();
}
bool Incidence::isAlarmEnabled() const
{
Alarm* alarm;
for (QPtrListIterator<Alarm> it(mAlarms); (alarm = it.current()) != 0; ++it) {
if (alarm->enabled())
return true;
}
return false;
}
Recurrence *Incidence::recurrence() const
{
return mRecurrence;
}
+void Incidence::setRecurrence( Recurrence * r)
+{
+ delete mRecurrence;
+ mRecurrence = r;
+}
void Incidence::setLocation(const QString &location)
{
if (mReadOnly) return;
mLocation = location;
updated();
}
QString Incidence::location() const
{
return mLocation;
}
ushort Incidence::doesRecur() const
{
if ( mRecurrence ) return mRecurrence->doesRecur();
else return Recurrence::rNone;
}
QDateTime Incidence::getNextOccurence( const QDateTime& dt, bool* ok ) const
{
QDateTime incidenceStart = dt;
*ok = false;
if ( doesRecur() ) {