KCal Library
vcalformat.h
Go to the documentation of this file.
00001 /* 00002 This file is part of the kcal library. 00003 00004 Copyright (c) 1998 Preston Brown <pbrown@kde.org> 00005 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org> 00006 00007 This library is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU Library General Public 00009 License as published by the Free Software Foundation; either 00010 version 2 of the License, or (at your option) any later version. 00011 00012 This library is distributed in the hope that it will be useful, 00013 but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00015 Library General Public License for more details. 00016 00017 You should have received a copy of the GNU Library General Public License 00018 along with this library; see the file COPYING.LIB. If not, write to 00019 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00020 Boston, MA 02110-1301, USA. 00021 */ 00038 #ifndef KCAL_VCALFORMAT_H 00039 #define KCAL_VCALFORMAT_H 00040 00041 #include "calformat.h" 00042 #include "todo.h" 00043 #include "event.h" 00044 #include "kcal_export.h" 00045 00046 #include <kdatetime.h> 00047 00048 #include <QtCore/QByteArray> 00049 00050 #define _VCAL_VERSION "1.0" 00051 00052 struct VObject; 00053 00054 namespace KCal { 00055 00056 class KCAL_EXPORT_DEPRECATED VCalFormat : public CalFormat 00057 { 00058 public: 00059 VCalFormat(); 00060 virtual ~VCalFormat(); 00061 00066 bool load( Calendar *calendar, const QString &fileName ); 00067 00072 bool save( Calendar *calendar, const QString &fileName ); 00073 00078 bool fromString( Calendar *calendar, const QString &string ); 00079 00084 QString toString( Calendar *calendar ); 00085 00090 bool fromRawString( Calendar *calendar, const QByteArray &string ); 00091 00092 protected: 00096 Todo *VTodoToEvent( VObject *vtodo ); 00097 00101 Event *VEventToEvent( VObject *vevent ); 00102 00106 VObject *eventToVTodo( const Todo *anEvent ); 00107 00111 VObject *eventToVEvent( const Event *anEvent ); 00112 00116 QString qDateToISO( const QDate &date ); 00117 00121 QString kDateTimeToISO( const KDateTime &date, bool zulu=true ); 00122 00126 KDateTime ISOToKDateTime( const QString &dtStr ); 00127 00131 QDate ISOToQDate( const QString &dtStr ); 00132 00137 void populate( VObject *vcal ); 00138 00145 const char *dayFromNum( int day ); 00146 00148 int numFromDay( const QString &day ); 00149 00150 Attendee::PartStat readStatus( const char *s ) const; 00151 QByteArray writeStatus( Attendee::PartStat status ) const; 00152 00153 private: 00157 enum PilotState { 00158 SYNCNONE = 0, 00159 SYNCMOD = 1, 00160 SYNCDEL = 3 00161 }; 00162 00163 //@cond PRIVATE 00164 Q_DISABLE_COPY( VCalFormat ) 00165 class Private; 00166 Private *const d; 00167 //@endcond 00168 }; 00169 00170 } 00171 00172 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:43 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:49:43 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.