-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 @@ -55,5 +55,5 @@ void Calendar::init() mUndoIncidence = 0; mModified = false; - + mDefaultCalendar = 1; // Setup default filter, which does nothing mDefaultFilter = new CalFilter; @@ -113,5 +113,12 @@ Calendar::~Calendar() delete mUndoIncidence; } - +void Calendar::setDefaultCalendar( int d ) +{ + mDefaultCalendar = d; +} +int Calendar::defaultCalendar() +{ + return mDefaultCalendar; +} const QString &Calendar::getOwner() const { @@ -349,5 +356,6 @@ bool Calendar::addIncidence(Incidence *i) { Incidence::AddVisitor<Calendar> v(this); - + i->setCalID( mDefaultCalendar ); + i->setCalEnabled( true ); return i->accept(v); } |