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

KCal Library

  • KCal
  • ResourceLocal
Public Member Functions | Protected Slots | Protected Member Functions
KCal::ResourceLocal Class Reference

#include <resourcelocal.h>

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

List of all members.

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)

Protected Slots

void reload ()

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 ()

Detailed Description

Provides a calendar resource stored as a local file.


Constructor & Destructor Documentation

ResourceLocal::ResourceLocal ( )

Constructs a resource using default configuration information.

Definition at line 61 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 70 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 88 of file resourcelocal.cpp.

ResourceLocal::~ResourceLocal ( ) [virtual]

Destroys the resource.

Definition at line 132 of file resourcelocal.cpp.


Member Function Documentation

bool ResourceLocal::doLoad ( bool  syncCache) [protected, virtual]

Actually loads the data from the local file.

Implements KCal::ResourceCached.

Definition at line 147 of file resourcelocal.cpp.

bool ResourceLocal::doReload ( ) [protected, virtual]

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 186 of file resourcelocal.cpp.

bool ResourceLocal::doSave ( bool  syncCache) [protected, virtual]

Actually saves the data to the local file.

Implements KCal::ResourceCached.

Definition at line 166 of file resourcelocal.cpp.

bool ResourceLocal::doSave ( bool  syncCache,
Incidence *  incidence 
) [protected, virtual]

Do the actual saving of the resource data.

Called by save(CacheAction). Save one Incidence. The default implementation calls doSave(bool) to save everything.

Parameters:
syncCacheif true, the cache will be uploaded to the remote resource. If false, only the cache will be updated
incidenceThe incidence to be saved.

Reimplemented from KCal::ResourceCached.

Definition at line 176 of file resourcelocal.cpp.

void ResourceLocal::dump ( ) const [virtual]

Dumps the resource.

Reimplemented from KRES::Resource.

Definition at line 212 of file resourcelocal.cpp.

QString ResourceLocal::fileName ( ) const

Returns the fileName for this resource.

See also:
setFileName()

Definition at line 218 of file resourcelocal.cpp.

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

Returns the lock.

Implements KCal::ResourceCalendar.

Definition at line 181 of file resourcelocal.cpp.

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

Sets this ResourceLocal equal to other.

Definition at line 255 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 248 of file resourcelocal.cpp.

KDateTime ResourceLocal::readLastModified ( ) [protected]

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

See also:
doSave()

Definition at line 141 of file resourcelocal.cpp.

void ResourceLocal::reload ( ) [protected, slot]

Reload the resource data from the local file.

Definition at line 205 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 223 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 239 of file resourcelocal.cpp.

void ResourceLocal::writeConfig ( KConfigGroup &  group) [virtual]

Writes KConfig config to a local file.

Reimplemented from KCal::ResourceCached.

Definition at line 96 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-2012 The KDE developers.
Generated on Mon May 14 2012 05:05:37 by doxygen 1.7.5 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
  • Related Pages

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
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