-rw-r--r-- | libkcal/calendar.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libkcal/calendar.cpp b/libkcal/calendar.cpp index 7e8e2c5..f4350d9 100644 --- a/libkcal/calendar.cpp +++ b/libkcal/calendar.cpp @@ -54,7 +54,7 @@ void Calendar::init() mNewObserver = false; mUndoIncidence = 0; mModified = false; - + mDefaultCalendar = 1; // Setup default filter, which does nothing mDefaultFilter = new CalFilter; mFilter = mDefaultFilter; @@ -112,7 +112,14 @@ Calendar::~Calendar() if ( mUndoIncidence ) delete mUndoIncidence; } - +void Calendar::setDefaultCalendar( int d ) +{ + mDefaultCalendar = d; +} +int Calendar::defaultCalendar() +{ + return mDefaultCalendar; +} const QString &Calendar::getOwner() const { return mOwner; @@ -348,7 +355,8 @@ void Calendar::addIncidenceBranch(Incidence *i) bool Calendar::addIncidence(Incidence *i) { Incidence::AddVisitor<Calendar> v(this); - + i->setCalID( mDefaultCalendar ); + i->setCalEnabled( true ); return i->accept(v); } void Calendar::deleteIncidence(Incidence *in) |