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

KCal Library

  • kcal
calformat.h
Go to the documentation of this file.
1/*
2 This file is part of the kcal library.
3
4 Copyright (c) 2001-2003 Cornelius Schumacher <schumacher@kde.org>
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 Boston, MA 02110-1301, USA.
20*/
29#ifndef KCAL_CALFORMAT_H
30#define KCAL_CALFORMAT_H
31
32#include <QtCore/QString>
33#include <QtCore/QDateTime>
34#include <QtCore/QEvent>
35
36#include "exceptions.h"
37#include "event.h"
38#include "kcal_export.h"
39
40namespace KCal {
41
42class Calendar;
43
51class KCAL_DEPRECATED_EXPORT CalFormat
52{
53 public:
57 CalFormat();
58
62 virtual ~CalFormat();
63
72 virtual bool load( Calendar *calendar, const QString &fileName ) = 0;
73
82 virtual bool save( Calendar *calendar, const QString &fileName ) = 0;
83
93 virtual bool fromString( Calendar *calendar, const QString &string ) = 0;
94
107 virtual bool fromRawString( Calendar *calendar, const QByteArray &string ) = 0;
108
117 virtual QString toString( Calendar *calendar ) = 0;
118
122 void clearException();
123
128 ErrorFormat *exception();
129
137 static void setApplication( const QString &application,
138 const QString &productID );
139
143 static const QString &application(); //krazy:exclude=constref
144
148 static const QString &productId(); //krazy:exclude=constref
149
153 const QString &loadedProductId(); //krazy:exclude=constref
154
158 static QString createUniqueId();
159
166 void setException( ErrorFormat *error );
167
168 protected:
170 void setLoadedProductId( const QString &id );
171
172 private:
173 //@cond PRIVATE
174 Q_DISABLE_COPY( CalFormat )
175 class Private;
176 Private *const d;
177 //@endcond
178};
179
180}
181
182#endif
KCal::CalFormat
An abstract base class that provides an interface to various calendar formats.
Definition: calformat.h:52
KCal::CalFormat::toString
virtual QString toString(Calendar *calendar)=0
Returns the calendar as a string.
KCal::CalFormat::save
virtual bool save(Calendar *calendar, const QString &fileName)=0
Writes the calendar to disk.
KCal::CalFormat::fromString
virtual bool fromString(Calendar *calendar, const QString &string)=0
Loads a calendar from a string.
KCal::CalFormat::load
virtual bool load(Calendar *calendar, const QString &fileName)=0
Loads a calendar on disk into the calendar associated with this format.
KCal::CalFormat::fromRawString
virtual bool fromRawString(Calendar *calendar, const QByteArray &string)=0
Parses a utf8 encoded string, returning the first iCal component encountered in that string.
KCal::Calendar
Represents the main calendar class.
Definition: calendar.h:121
KCal::ErrorFormat
Calendar format related error class.
Definition: exceptions.h:83
event.h
This file is part of the API for handling calendar data and defines the Event class.
exceptions.h
This file is part of the API for handling calendar data and defines the Exception and ErrorFormat cla...
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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-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