KCal Library
calformat.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
00029 #ifndef KCAL_CALFORMAT_H
00030 #define KCAL_CALFORMAT_H
00031
00032 #include <QtCore/QString>
00033 #include <QtCore/QDateTime>
00034 #include <QtCore/QEvent>
00035
00036 #include "exceptions.h"
00037 #include "event.h"
00038 #include "kcal_export.h"
00039
00040 namespace KCal {
00041
00042 class Calendar;
00043
00051 class KCAL_EXPORT CalFormat
00052 {
00053 public:
00057 CalFormat();
00058
00062 virtual ~CalFormat();
00063
00072 virtual bool load( Calendar *calendar, const QString &fileName ) = 0;
00073
00082 virtual bool save( Calendar *calendar, const QString &fileName ) = 0;
00083
00093 virtual bool fromString( Calendar *calendar, const QString &string ) = 0;
00094
00107 virtual bool fromRawString( Calendar *calendar, const QByteArray &string ) = 0;
00108
00117 virtual QString toString( Calendar *calendar ) = 0;
00118
00122 void clearException();
00123
00128 ErrorFormat *exception();
00129
00137 static void setApplication( const QString &application,
00138 const QString &productID );
00139
00143 static const QString &application();
00144
00148 static const QString &productId();
00149
00153 const QString &loadedProductId();
00154
00158 static QString createUniqueId();
00159
00166 void setException( ErrorFormat *error );
00167
00168 protected:
00170 void setLoadedProductId( const QString &id );
00171
00172 private:
00173
00174 Q_DISABLE_COPY( CalFormat )
00175 class Private;
00176 Private *const d;
00177
00178 };
00179
00180 }
00181
00182 #endif