KCal Library
resourcelocal.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00031 #ifndef KCAL_RESOURCELOCAL_H
00032 #define KCAL_RESOURCELOCAL_H
00033
00034 #include <QtCore/QString>
00035
00036 #include <kdatetime.h>
00037
00038 #include "kcal_export.h"
00039 #include "resourcecached.h"
00040
00041 namespace KCal {
00042
00046 class KCAL_EXPORT ResourceLocal : public ResourceCached
00047 {
00048 Q_OBJECT
00049
00050 friend class ResourceLocalConfig;
00051
00052 public:
00053
00057 ResourceLocal();
00058
00065 explicit ResourceLocal( const KConfigGroup &group );
00066
00072 explicit ResourceLocal( const QString &fileName );
00073
00077 virtual ~ResourceLocal();
00078
00082 virtual void writeConfig( KConfigGroup &group );
00083
00087 KABC::Lock *lock();
00088
00094 QString fileName() const;
00095
00104 bool setFileName( const QString &fileName );
00105
00112 bool setValue( const QString &key, const QString &value );
00113
00117 void dump() const;
00118
00119 protected Q_SLOTS:
00120
00124 void reload();
00125
00126 protected:
00127
00131 virtual bool doLoad( bool syncCache );
00132
00136 virtual bool doSave( bool syncCache );
00137
00142 virtual bool doSave( bool syncCache, Incidence * );
00143
00151 virtual bool doReload();
00152
00158 KDateTime readLastModified();
00159
00166 bool operator==( const ResourceLocal &other );
00167
00171 ResourceLocal &operator=( const ResourceLocal &other );
00172
00173 private:
00174
00175 using ResourceCalendar::doLoad;
00176 using ResourceCalendar::doSave;
00177
00178 void init();
00179
00180 class Private;
00181 Private *const d;
00182
00183 };
00184
00185 }
00186
00187 #endif