• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KCal Library

  • KCal
  • ResourceLocal
Public Member Functions | Protected Slots | Protected Member Functions | List of all members
KCal::ResourceLocal Class Reference

#include <resourcelocal.h>

Inheritance diagram for KCal::ResourceLocal:
Inheritance graph
[legend]

Public Member Functions

 ResourceLocal ()
 
 ResourceLocal (const KConfigGroup &group)
 
 ResourceLocal (const QString &fileName)
 
virtual ~ResourceLocal ()
 
void dump () const
 
QString fileName () const
 
KABC::Lock * lock ()
 
bool setFileName (const QString &fileName)
 
bool setValue (const QString &key, const QString &value)
 
virtual void writeConfig (KConfigGroup &group)
 
- Public Member Functions inherited from KCal::ResourceCached
 ResourceCached (const KConfigGroup &group)
 
Incidence::List addedIncidences () const
 
bool addEvent (Event *event)
 
virtual KCAL_DEPRECATED bool addJournal (Journal *journal)
 
bool addTodo (Todo *todo)
 
Alarm::List alarms (const KDateTime &from, const KDateTime &to)
 
Alarm::List alarmsTo (const KDateTime &to)
 
Incidence::List allChanges () const
 
Incidence::List changedIncidences () const
 
void cleanUpEventCache (const KCal::Event::List &eventList)
 
void cleanUpTodoCache (const KCal::Todo::List &todoList)
 
void clearCache ()
 
void clearChange (Incidence *incidence)
 
void clearChange (const QString &uid)
 
void clearChanges ()
 
bool defaultReloadInhibited () const
 
void deleteAllEvents ()
 
virtual void deleteAllJournals ()
 
void deleteAllTodos ()
 
Incidence::List deletedIncidences () const
 
bool deleteEvent (Event *event)
 
virtual bool deleteJournal (Journal *)
 
bool deleteTodo (Todo *)
 
void disableChangeNotification ()
 
void enableChangeNotification ()
 
Event * event (const QString &UniqueStr)
 
Event::List events ()
 
bool hasChanges () const
 
KRES::IdMapper & idMapper ()
 
bool inhibitDefaultReload (bool inhibit)
 
virtual Journal * journal (const QString &uid)
 
KDateTime lastLoad () const
 
KDateTime lastSave () const
 
bool load (CacheAction action)
 
virtual bool load ()
 
bool loadFromCache ()
 
Person owner () const
 
Event::List rawEvents (EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Event::List rawEvents (const QDate &start, const QDate &end, const KDateTime::Spec &timeSpec=KDateTime::Spec(), bool inclusive=false)
 
Event::List rawEventsForDate (const QDate &date, const KDateTime::Spec &timeSpec=KDateTime::Spec(), EventSortField sortField=EventSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Event::List rawEventsForDate (const KDateTime &dt)
 
Journal::List rawJournals (JournalSortField sortField=JournalSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Journal::List rawJournalsForDate (const QDate &date)
 
Todo::List rawTodos (TodoSortField sortField=TodoSortUnsorted, SortDirection sortDirection=SortDirectionAscending)
 
Todo::List rawTodosForDate (const QDate &date)
 
void readConfig (const KConfigGroup &group)
 
bool reloaded () const
 
int reloadInterval () const
 
int reloadPolicy () const
 
bool save (CacheAction action, Incidence *incidence=0)
 
virtual bool save (Incidence *incidence=0)
 
int saveInterval () const
 
int savePolicy () const
 
void saveToCache ()
 
void setOwner (const Person &owner)
 
void setReloadInterval (int minutes)
 
void setReloadPolicy (int policy)
 
void setSaveInterval (int minutes)
 
void setSavePolicy (int policy)
 
void setTimeSpec (const KDateTime::Spec &timeSpec)
 
void setTimeZoneId (const QString &timeZoneId)
 
virtual void shiftTimes (const KDateTime::Spec &oldSpec, const KDateTime::Spec &newSpec)
 
KDateTime::Spec timeSpec () const
 
QString timeZoneId () const
 
Todo * todo (const QString &uid)
 
- Public Member Functions inherited from KCal::ResourceCalendar
 ResourceCalendar (const KConfigGroup &group)
 
virtual bool addIncidence (Incidence *)
 
virtual bool canHaveSubresources () const
 
virtual bool deleteIncidence (Incidence *)
 
Incidence * incidence (const QString &uid)
 
virtual QString infoText () const
 
bool isResolveConflictSet () const
 
virtual bool isSaving ()
 
virtual QString labelForSubresource (const QString &resource) const
 
Incidence::List rawIncidences ()
 
bool save (Incidence *incidence=0)
 
bool save (QString &err, Incidence *incidence=0)
 
bool saveInhibited () const
 
void setInhibitSave (bool inhibit)
 
void setResolveConflict (bool b)
 
virtual bool subresourceActive (const QString &resource) const
 
virtual QString subresourceIdentifier (Incidence *incidence)
 
virtual QStringList subresources () const
 
- Public Member Functions inherited from KRES::Resource
 Resource (const KConfigGroup &group)
 
void close ()
 
QString identifier () const
 
bool isActive () const
 
bool isOpen () const
 
bool open ()
 
virtual bool readOnly () const
 
virtual QString resourceName () const
 
void setActive (bool active)
 
void setIdentifier (const QString &identifier)
 
virtual void setReadOnly (bool value)
 
virtual void setResourceName (const QString &name)
 
void setType (const QString &type)
 
QString type () const
 
- Public Member Functions inherited from KCal::Calendar::CalendarObserver
virtual ~CalendarObserver ()
 
virtual void calendarModified (bool modified, Calendar *calendar)
 

Protected Slots

void reload ()
 
- Protected Slots inherited from KCal::ResourceCached
void setIdMapperIdentifier ()
 
void slotReload ()
 
void slotSave ()
 

Protected Member Functions

virtual bool doLoad (bool syncCache)
 
virtual bool doReload ()
 
virtual bool doSave (bool syncCache)
 
virtual bool doSave (bool syncCache, Incidence *incidence)
 
ResourceLocal & operator= (const ResourceLocal &other)
 
bool operator== (const ResourceLocal &other)
 
KDateTime readLastModified ()
 
- Protected Member Functions inherited from KCal::ResourceCached
void addInfoText (QString &) const
 
virtual QString cacheFile () const
 
CalendarLocal * calendar () const
 
void calendarIncidenceAdded (KCal::Incidence *incidence)
 
void calendarIncidenceChanged (KCal::Incidence *incidence)
 
void calendarIncidenceDeleted (KCal::Incidence *incidence)
 
virtual QString changesCacheFile (const QString &type) const
 
void checkForAutomaticSave ()
 
bool checkForReload ()
 
bool checkForSave ()
 
virtual void doClose ()
 
virtual bool doOpen ()
 
void loadChangesCache (QMap< Incidence *, bool > &map, const QString &type)
 
void loadChangesCache ()
 
void saveChangesCache (const QMap< Incidence *, bool > &map, const QString &type)
 
void saveChangesCache ()
 
void setReloaded (bool done)
 
void setupReloadTimer ()
 
void setupSaveTimer ()
 
- Protected Member Functions inherited from KCal::ResourceCalendar
void loadError (const QString &errorMessage=QString())
 
bool noReadOnlyOnLoad () const
 
bool receivedLoadError () const
 
bool receivedSaveError () const
 
void saveError (const QString &errorMessage=QString())
 
void setNoReadOnlyOnLoad (bool noReadOnly)
 
void setReceivedLoadError (bool b)
 
void setReceivedSaveError (bool b)
 

Additional Inherited Members

- Public Types inherited from KCal::ResourceCached
enum  { ReloadNever, ReloadOnStartup, ReloadInterval }
 
enum  {
  SaveNever, SaveOnExit, SaveInterval, SaveDelayed,
  SaveAlways
}
 
enum  CacheAction { DefaultCache, NoSyncCache, SyncCache }
 
- Public Slots inherited from KCal::ResourceCalendar
virtual bool addSubresource (const QString &resource, const QString &parent)
 
virtual bool removeSubresource (const QString &resource)
 
virtual void setSubresourceActive (const QString &resource, bool active)
 
virtual QString subresourceType (const QString &resource)
 
- Signals inherited from KCal::ResourceCalendar
void resourceChanged (ResourceCalendar *)
 
void resourceLoaded (ResourceCalendar *)
 
void resourceLoadError (ResourceCalendar *, const QString &error)
 
void resourceSaved (ResourceCalendar *)
 
void resourceSaveError (ResourceCalendar *, const QString &error)
 
void signalSubresourceAdded (ResourceCalendar *, const QString &type, const QString &subresource, const QString &label)
 
void signalSubresourceRemoved (ResourceCalendar *, const QString &, const QString &)
 

Detailed Description

Provides a calendar resource stored as a local file.

Definition at line 46 of file resourcelocal.h.

Constructor & Destructor Documentation

ResourceLocal::ResourceLocal ( )

Constructs a resource using default configuration information.

Definition at line 60 of file resourcelocal.cpp.

ResourceLocal::ResourceLocal ( const KConfigGroup &  group)
explicit

Constructs a resource from configuration information stored in a KConfig object.

Parameters
groupthe configuration group to read the resource configuration from

Definition at line 69 of file resourcelocal.cpp.

ResourceLocal::ResourceLocal ( const QString &  fileName)
explicit

Constructs a resource for file named fileName.

Parameters
fileNamethe file to link to the resource.

Definition at line 87 of file resourcelocal.cpp.

ResourceLocal::~ResourceLocal ( )
virtual

Destroys the resource.

Definition at line 131 of file resourcelocal.cpp.

Member Function Documentation

bool ResourceLocal::doLoad ( bool  syncCache)
protectedvirtual

Actually loads the data from the local file.

Implements KCal::ResourceCached.

Definition at line 146 of file resourcelocal.cpp.

bool ResourceLocal::doReload ( )
protectedvirtual

Called by reload() to reload the resource, if it is already open.

Returns
true if successful, else false. If true is returned, reload() will emit a resourceChanged() signal.
See also
doLoad(), doSave()

Definition at line 185 of file resourcelocal.cpp.

bool ResourceLocal::doSave ( bool  syncCache)
protectedvirtual

Actually saves the data to the local file.

Implements KCal::ResourceCached.

Definition at line 165 of file resourcelocal.cpp.

bool ResourceLocal::doSave ( bool  syncCache,
Incidence *  incidence 
)
protectedvirtual

ResourceCached::doSave(bool, Incidence*)

Reimplemented from KCal::ResourceCached.

Definition at line 175 of file resourcelocal.cpp.

void ResourceLocal::dump ( ) const
virtual

Dumps the resource.

Reimplemented from KRES::Resource.

Definition at line 211 of file resourcelocal.cpp.

QString ResourceLocal::fileName ( ) const

Returns the fileName for this resource.

See also
setFileName()

Definition at line 217 of file resourcelocal.cpp.

KABC::Lock * ResourceLocal::lock ( )
virtual

Returns the lock.

Implements KCal::ResourceCalendar.

Definition at line 180 of file resourcelocal.cpp.

ResourceLocal & ResourceLocal::operator= ( const ResourceLocal &  other)
protected

Sets this ResourceLocal equal to other.

Definition at line 254 of file resourcelocal.cpp.

bool ResourceLocal::operator== ( const ResourceLocal &  other)
protected

Compares this ResourceLocal and other for equality.

Returns true if they are equal.

Parameters
otherthe instance to compare with

Definition at line 247 of file resourcelocal.cpp.

KDateTime ResourceLocal::readLastModified ( )
protected

Returns the date/time the local file was last modified.

See also
doSave()

Definition at line 140 of file resourcelocal.cpp.

void ResourceLocal::reload ( )
protectedslot

Reload the resource data from the local file.

Definition at line 204 of file resourcelocal.cpp.

bool ResourceLocal::setFileName ( const QString &  fileName)

Sets the fileName for this resource.

This will be the local file where the resource data will be stored.

Parameters
fileNamethe file to use for this resource
See also
fileName()

Definition at line 222 of file resourcelocal.cpp.

bool ResourceLocal::setValue ( const QString &  key,
const QString &  value 
)
virtual

Sets a value for this resource.

Parameters
keythe distinct name for this value.
valuethe actual data for this value.

Reimplemented from KCal::ResourceCalendar.

Definition at line 238 of file resourcelocal.cpp.

void ResourceLocal::writeConfig ( KConfigGroup &  group)
virtual

Writes KConfig config to a local file.

Reimplemented from KCal::ResourceCached.

Definition at line 95 of file resourcelocal.cpp.


The documentation for this class was generated from the following files:
  • resourcelocal.h
  • resourcelocal.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal