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

KCalCore Library

  • sources
  • kde-4.12
  • kdepimlibs
  • kcalcore
vcalformat.h
Go to the documentation of this file.
1 /*
2  This file is part of the kcalcore 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 KCALCORE_VCALFORMAT_H
39 #define KCALCORE_VCALFORMAT_H
40 
41 #include "kcalcore_export.h"
42 #include "attendee.h"
43 #include "calformat.h"
44 #include "event.h"
45 #include "todo.h"
46 #include "journal.h"
47 
48 struct VObject;
49 
50 class KDateTime;
51 
52 class QDate;
53 
54 #define _VCAL_VERSION "1.0"
55 
56 namespace KCalCore {
57 
58 class Event;
59 class Todo;
60 
69 class KCALCORE_EXPORT VCalFormat : public CalFormat
70 {
71 public:
75  VCalFormat();
76 
80  virtual ~VCalFormat();
81 
86  bool load(const Calendar::Ptr &calendar, const QString &fileName);
87 
92  bool save(const Calendar::Ptr &calendar, const QString &fileName);
93 
98  bool fromString(const Calendar::Ptr &calendar, const QString &string,
99  bool deleted = false, const QString &notebook = QString());
100 
105  QString toString(const Calendar::Ptr &calendar, const QString &notebook = QString(),
106  bool deleted = false);
107 
112  bool fromRawString(const Calendar::Ptr &calendar, const QByteArray &string,
113  bool deleted = false, const QString &notebook = QString());
114 
115 protected:
120  Todo::Ptr VTodoToEvent(VObject *vtodo);
121 
126  Event::Ptr VEventToEvent(VObject *vevent);
127 
132  VObject *eventToVEvent(const Event::Ptr &event);
133 
137  QString parseTZ(const QByteArray &timezone) const;
138 
142  QString parseDst(QByteArray &timezone) const;
143 
148  VObject *eventToVTodo(const Todo::Ptr &todo);
149 
154  QString qDateToISO(const QDate &date);
155 
161  QString kDateTimeToISO(const KDateTime &date, bool zulu = true);
162 
168  KDateTime ISOToKDateTime(const QString &dtStr);
169 
175  QDate ISOToQDate(const QString &dtStr);
176 
187  bool parseTZOffsetISO8601(const QString &s, int &result);
188 
193  void populate(VObject *vcal, bool deleted = false, const QString &notebook = QString());
194 
202  const char *dayFromNum(int day);
203 
210  int numFromDay(const QString &day);
211 
219  Attendee::PartStat readStatus(const char *s) const;
220 
227  QByteArray writeStatus(Attendee::PartStat status) const;
228 
229  void readCustomProperties(VObject *o, const Incidence::Ptr &i);
230  void writeCustomProperties(VObject *o, const Incidence::Ptr &i);
231 
232 protected:
237  virtual void virtual_hook(int id, void *data);
238 
239 private:
243  enum PilotState {
244  SYNCNONE = 0,
245  SYNCMOD = 1,
246  SYNCDEL = 3
247  };
248 
249  //@cond PRIVATE
250  Q_DISABLE_COPY(VCalFormat)
251  class Private;
252  Private *const d;
253  //@endcond
254 };
255 
256 }
257 
258 #endif
attendee.h
This file is part of the API for handling calendar data and defines the Attendee class.
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
A shared pointer to an Event object.
Definition: event.h:55
KCalCore::CalFormat
An abstract base class that provides an interface to various calendar formats.
Definition: calformat.h:48
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
Definition: incidence.h:112
calformat.h
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
KCalCore::Attendee::PartStat
PartStat
The different types of participant status.
Definition: attendee.h:70
journal.h
This file is part of the API for handling calendar data and defines the Journal class.
KCalCore::Calendar::Ptr
QSharedPointer< Calendar > Ptr
A shared pointer to a Calendar.
Definition: calendar.h:138
event.h
This file is part of the API for handling calendar data and defines the Event class.
KCalCore::VCalFormat
vCalendar format implementation.
Definition: vcalformat.h:69
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Definition: todo.h:50
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:59:57 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KCalCore Library

Skip menu "KCalCore 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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