diff options
Diffstat (limited to 'korganizer')
-rw-r--r-- | korganizer/actionmanager.cpp | 11 | ||||
-rw-r--r-- | korganizer/actionmanager.h | 5 | ||||
-rw-r--r-- | korganizer/korganizeriface.h | 1 | ||||
-rw-r--r-- | korganizer/korganizerifaceimpl.cpp | 6 | ||||
-rw-r--r-- | korganizer/korganizerifaceimpl.h | 1 |
5 files changed, 24 insertions, 0 deletions
diff --git a/korganizer/actionmanager.cpp b/korganizer/actionmanager.cpp index 8d1bb0aef..99939ef1c 100644 --- a/korganizer/actionmanager.cpp +++ b/korganizer/actionmanager.cpp @@ -1860,6 +1860,17 @@ bool ActionManager::saveResourceCalendar() return true; } +void ActionManager::loadResourceCalendar() +{ + if ( !mCalendarResources ) return; + CalendarResourceManager *m = mCalendarResources->resourceManager(); + + CalendarResourceManager::ActiveIterator it; + for ( it = m->activeBegin(); it != m->activeEnd(); ++it ) { + (*it)->load(); + } +} + void ActionManager::importCalendar( const KURL &url ) { if ( !url.isValid() ) { diff --git a/korganizer/actionmanager.h b/korganizer/actionmanager.h index f19f7b4bb..25fd6fabb 100644 --- a/korganizer/actionmanager.h +++ b/korganizer/actionmanager.h @@ -106,6 +106,11 @@ class KDE_EXPORT ActionManager : public TQObject, public KCalendarIface */ bool saveResourceCalendar(); + /** + Load the resource based calendar. + */ + void loadResourceCalendar(); + public slots: /** Add a new resource */ bool addResource( const KURL &mUrl ); diff --git a/korganizer/korganizeriface.h b/korganizer/korganizeriface.h index b3be3c64a..f3d8a15ea 100644 --- a/korganizer/korganizeriface.h +++ b/korganizer/korganizeriface.h @@ -36,6 +36,7 @@ class KOrganizerIface : virtual public DCOPObject virtual TQString getCurrentURLasString() const = 0; virtual bool editIncidence(const TQString &uid) = 0; virtual bool deleteIncidence(const TQString &uid) = 0; + virtual void syncAllResources() = 0; /** Delete the incidence with the given unique ID from the active calendar. @param uid The incidence's unique ID. diff --git a/korganizer/korganizerifaceimpl.cpp b/korganizer/korganizerifaceimpl.cpp index 7b61f8cf7..77db1afc7 100644 --- a/korganizer/korganizerifaceimpl.cpp +++ b/korganizer/korganizerifaceimpl.cpp @@ -60,6 +60,12 @@ void KOrganizerIfaceImpl::closeURL() return mActionManager->closeURL(); } +void KOrganizerIfaceImpl::syncAllResources() +{ + mActionManager->saveResourceCalendar(); + mActionManager->loadResourceCalendar(); +} + bool KOrganizerIfaceImpl::saveURL() { return mActionManager->saveURL(); diff --git a/korganizer/korganizerifaceimpl.h b/korganizer/korganizerifaceimpl.h index c49d36bb4..03f02a9e8 100644 --- a/korganizer/korganizerifaceimpl.h +++ b/korganizer/korganizerifaceimpl.h @@ -52,6 +52,7 @@ public: bool canQueryClose(); bool saveAsURL( const TQString &url ); TQString getCurrentURLasString() const; + void syncAllResources(); bool editIncidence( const TQString &uid ); /** @reimp from KOrganizerIface::deleteIncidence() */ |