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

KCalCore Library

  • 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
48struct VObject;
49
50class KDateTime;
51
52class QDate;
53
54#define _VCAL_VERSION "1.0"
55
56namespace KCalCore {
57
58class Event;
59class Todo;
60
69class KCALCORE_EXPORT VCalFormat : public CalFormat
70{
71public:
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
115protected:
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
232protected:
237 virtual void virtual_hook(int id, void *data);
238
239private:
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.
calformat.h
This file is part of the API for handling calendar data and defines the CalFormat abstract base class...
KCalCore::Attendee::PartStat
PartStat
The different types of participant status.
Definition attendee.h:70
KCalCore::CalFormat
An abstract base class that provides an interface to various calendar formats.
Definition calformat.h:49
KCalCore::Calendar::Ptr
QSharedPointer< Calendar > Ptr
A shared pointer to a Calendar.
Definition calendar.h:138
KCalCore::Event::Ptr
QSharedPointer< Event > Ptr
A shared pointer to an Event object.
Definition event.h:55
KCalCore::Incidence::Ptr
QSharedPointer< Incidence > Ptr
A shared pointer to an Incidence.
Definition incidence.h:112
KCalCore::Todo::Ptr
QSharedPointer< Todo > Ptr
A shared pointer to a Todo object.
Definition todo.h:50
KCalCore::VCalFormat
vCalendar format implementation.
Definition vcalformat.h:70
event.h
This file is part of the API for handling calendar data and defines the Event class.
journal.h
This file is part of the API for handling calendar data and defines the Journal class.
KCalCore
TODO: KDE5:
Definition alarm.h:47
qHash
static uint qHash(const KDateTime &dt)
Private class that helps to provide binary compatibility between releases.
Definition occurrenceiterator.cpp:157
todo.h
This file is part of the API for handling calendar data and defines the Todo class.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 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-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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
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