summaryrefslogtreecommitdiffabout
path: root/libkcal/calendar.cpp
Unidiff
Diffstat (limited to 'libkcal/calendar.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkcal/calendar.cpp14
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
@@ -53,9 +53,9 @@ void Calendar::init()
53 mObserver = 0; 53 mObserver = 0;
54 mNewObserver = false; 54 mNewObserver = false;
55 mUndoIncidence = 0; 55 mUndoIncidence = 0;
56 mModified = false; 56 mModified = false;
57 57 mDefaultCalendar = 1;
58 // Setup default filter, which does nothing 58 // Setup default filter, which does nothing
59 mDefaultFilter = new CalFilter; 59 mDefaultFilter = new CalFilter;
60 mFilter = mDefaultFilter; 60 mFilter = mDefaultFilter;
61 mFilter->setEnabled(false); 61 mFilter->setEnabled(false);
@@ -111,9 +111,16 @@ Calendar::~Calendar()
111 delete mDefaultFilter; 111 delete mDefaultFilter;
112 if ( mUndoIncidence ) 112 if ( mUndoIncidence )
113 delete mUndoIncidence; 113 delete mUndoIncidence;
114} 114}
115 115void Calendar::setDefaultCalendar( int d )
116{
117 mDefaultCalendar = d;
118}
119int Calendar::defaultCalendar()
120{
121 return mDefaultCalendar;
122}
116const QString &Calendar::getOwner() const 123const QString &Calendar::getOwner() const
117{ 124{
118 return mOwner; 125 return mOwner;
119} 126}
@@ -347,9 +354,10 @@ void Calendar::addIncidenceBranch(Incidence *i)
347 354
348bool Calendar::addIncidence(Incidence *i) 355bool Calendar::addIncidence(Incidence *i)
349{ 356{
350 Incidence::AddVisitor<Calendar> v(this); 357 Incidence::AddVisitor<Calendar> v(this);
351 358 i->setCalID( mDefaultCalendar );
359 i->setCalEnabled( true );
352 return i->accept(v); 360 return i->accept(v);
353} 361}
354void Calendar::deleteIncidence(Incidence *in) 362void Calendar::deleteIncidence(Incidence *in)
355{ 363{