• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KCal Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kcal
vcalformat.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcal library.
3 
4  Copyright (c) 1998 Preston Brown <pbrown@kde.org>
5  Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
6 
7  This library is free software; you can redistribute it and/or
8  modify it under the terms of the GNU Library General Public
9  License as published by the Free Software Foundation; either
10  version 2 of the License, or (at your option) any later version.
11 
12  This library is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15  Library General Public License for more details.
16 
17  You should have received a copy of the GNU Library General Public License
18  along with this library; see the file COPYING.LIB. If not, write to
19  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
20  Boston, MA 02110-1301, USA.
21 */
38 #ifndef KCAL_VCALFORMAT_H
39 #define KCAL_VCALFORMAT_H
40 
41 #include "calformat.h"
42 #include "todo.h"
43 #include "event.h"
44 #include "kcal_export.h"
45 
46 #include <kdatetime.h>
47 
48 #include <QtCore/QByteArray>
49 
50 #define _VCAL_VERSION "1.0"
51 
52 struct VObject;
53 
54 namespace KCal {
55 
56 class KCAL_DEPRECATED_EXPORT VCalFormat : public CalFormat
57 {
58  public:
59  VCalFormat();
60  virtual ~VCalFormat();
61 
66  bool load( Calendar *calendar, const QString &fileName );
67 
72  bool save( Calendar *calendar, const QString &fileName );
73 
78  bool fromString( Calendar *calendar, const QString &string );
79 
84  QString toString( Calendar *calendar );
85 
90  bool fromRawString( Calendar *calendar, const QByteArray &string );
91 
92  protected:
96  Todo *VTodoToEvent( VObject *vtodo );
97 
101  Event *VEventToEvent( VObject *vevent );
102 
106  VObject *eventToVTodo( const Todo *anEvent );
107 
111  VObject *eventToVEvent( const Event *anEvent );
112 
116  QString qDateToISO( const QDate &date );
117 
121  QString kDateTimeToISO( const KDateTime &date, bool zulu=true );
122 
126  KDateTime ISOToKDateTime( const QString &dtStr );
127 
131  QDate ISOToQDate( const QString &dtStr );
132 
137  void populate( VObject *vcal );
138 
145  const char *dayFromNum( int day );
146 
148  int numFromDay( const QString &day );
149 
150  Attendee::PartStat readStatus( const char *s ) const;
151  QByteArray writeStatus( Attendee::PartStat status ) const;
152 
153  private:
157  enum PilotState {
158  SYNCNONE = 0,
159  SYNCMOD = 1,
160  SYNCDEL = 3
161  };
162 
163  //@cond PRIVATE
164  Q_DISABLE_COPY( VCalFormat )
165  class Private;
166  Private *const d;
167  //@endcond
168 };
169 
170 }
171 
172 #endif
QByteArray
calformat.h
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
KCal::Attendee::PartStat
PartStat
The different types of participant status.
Definition: attendee.h:71
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
QDate
QString
QTest::toString
char * toString(const T &value)
event.h
This file is part of the API for handling calendar data and defines the Event class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:38:30 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCal Library

Skip menu "KCal Library"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal