libkcal Library API Documentation

vcalformat.h

00001 /*
00002     This file is part of libkcal.
00003     Copyright (c) 1998 Preston Brown
00004     Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
00005 
00006     This library is free software; you can redistribute it and/or
00007     modify it under the terms of the GNU Library General Public
00008     License as published by the Free Software Foundation; either
00009     version 2 of the License, or (at your option) any later version.
00010 
00011     This library is distributed in the hope that it will be useful,
00012     but WITHOUT ANY WARRANTY; without even the implied warranty of
00013     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014     Library General Public License for more details.
00015 
00016     You should have received a copy of the GNU Library General Public License
00017     along with this library; see the file COPYING.LIB.  If not, write to
00018     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00019     Boston, MA 02111-1307, USA.
00020 */
00021 
00022 #ifndef _VCALFORMAT_H
00023 #define _VCALFORMAT_H
00024 
00025 #include "calformat.h"
00026 
00027 #define _VCAL_VERSION "1.0"
00028 
00029 class VObject;
00030 
00031 namespace KCal {
00032 
00040 class VCalFormat : public CalFormat {
00041   public:
00042     VCalFormat();
00043     virtual ~VCalFormat();
00044 
00050     bool load(Calendar *,const QString &fileName);
00055     bool save(Calendar *,const QString &fileName);
00056   
00060     bool fromString( Calendar *, const QString & );  
00064     QString toString( Calendar * );
00065     
00066   protected:
00068     Todo *VTodoToEvent(VObject *vtodo);
00070     Event *VEventToEvent(VObject *vevent);
00072     VObject *eventToVTodo(const Todo *anEvent);
00074     VObject* eventToVEvent(const Event *anEvent);
00075 
00077     QString qDateToISO(const QDate &);
00079     QString qDateTimeToISO(const QDateTime &, bool zulu=TRUE);
00082     QDateTime ISOToQDateTime(const QString & dtStr);
00085     QDate ISOToQDate(const QString & dtStr);
00088     void populate(VObject *vcal);
00089   
00092     const char *dayFromNum(int day);
00094     int numFromDay(const QString &day);
00095 
00096     Attendee::PartStat readStatus(const char *s) const;
00097     QCString writeStatus(Attendee::PartStat status) const;
00098   
00099   private:
00100     Calendar *mCalendar;
00101   
00102     QPtrList<Event> mEventsRelate;           // events with relations
00103     QPtrList<Todo> mTodosRelate;             // todos with relations
00104 };
00105 
00106 }
00107 
00108 #endif
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Sun Feb 15 11:40:28 2004 by doxygen 1.3.5 written by Dimitri van Heesch, © 1997-2001