libkcal
calformat.h00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef KCAL_CALFORMAT_H
00022 #define KCAL_CALFORMAT_H
00023
00024 #include <qstring.h>
00025 #include <qdatetime.h>
00026 #include <qevent.h>
00027
00028 #include "exceptions.h"
00029 #include "event.h"
00030 #include "libkcal_export.h"
00031
00032 namespace KCal {
00033
00034 class VCalDrag;
00035 class Calendar;
00036
00043 class LIBKCAL_EXPORT CalFormat
00044 {
00045 public:
00047 CalFormat();
00049 virtual ~CalFormat();
00050
00056 virtual bool load(Calendar *, const QString &fileName) = 0;
00061 virtual bool save(Calendar *, const QString &fileName) = 0;
00062
00066 virtual bool fromString(Calendar *, const QString & ) = 0;
00070 virtual QString toString(Calendar *) = 0;
00071
00073 void clearException();
00078 ErrorFormat *exception();
00079
00083 static void setApplication(const QString& app, const QString& productID);
00085 static const QString& application() { return mApplication; }
00087 static const QString& productId() { return mProductId; }
00089 const QString &loadedProductId() { return mLoadedProductId; }
00090
00092 static QString createUniqueId();
00093
00098 void setException(ErrorFormat *error);
00099
00100 protected:
00101 QString mLoadedProductId;
00102
00103 private:
00104 ErrorFormat *mException;
00105
00106 static QString mApplication;
00107 static QString mProductId;
00108
00109 class Private;
00110 Private *d;
00111 };
00112
00113 }
00114
00115 #endif
|