• 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.12
  • kdepimlibs
  • kcal
icaltimezones.h
1 /*
2  This file is part of the kcal library.
3 
4  Copyright (c) 2005-2007 David Jarvie <djarvie@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 */
21 
22 #ifndef KCAL_ICALTIMEZONES_H
23 #define KCAL_ICALTIMEZONES_H
24 
25 #include <ktimezone.h>
26 
27 #include "kcal_export.h"
28 
29 #ifndef ICALCOMPONENT_H
30 typedef struct icalcomponent_impl icalcomponent;
31 #endif
32 #ifndef ICALTIMEZONE_DEFINED
33 #define ICALTIMEZONE_DEFINED
34 typedef struct _icaltimezone icaltimezone;
35 #endif
36 
37 namespace KCal {
38 
39 class ICalTimeZone;
40 class ICalTimeZoneSource;
41 class ICalTimeZoneData;
42 class ICalTimeZonesPrivate;
43 class ICalTimeZonePrivate;
44 class ICalTimeZoneSourcePrivate;
45 class ICalTimeZoneDataPrivate;
46 
64 class KCAL_DEPRECATED_EXPORT ICalTimeZones
65 {
66  public:
70  ICalTimeZones();
74  ~ICalTimeZones();
75 
84  ICalTimeZone zone( const QString &name ) const;
85 
86  typedef QMap<QString, ICalTimeZone> ZoneMap;
87 
93  const ZoneMap zones() const;
94 
103  bool add( const ICalTimeZone &zone );
104 
111  ICalTimeZone remove( const ICalTimeZone &zone );
112 
119  ICalTimeZone remove( const QString &name );
120 
124  void clear();
125 
126  private:
127  ICalTimeZones( const ICalTimeZones & ); // prohibit copying
128  ICalTimeZones &operator=( const ICalTimeZones & ); // prohibit copying
129 
130  ICalTimeZonesPrivate *const d;
131 };
132 
142 class KCAL_DEPRECATED_EXPORT ICalTimeZone : public KTimeZone //krazy:exclude=dpointer
143  //(no d-pointer for KTimeZone derived classes)
144 {
145  public:
151  ICalTimeZone();
152 
161  ICalTimeZone( ICalTimeZoneSource *source, const QString &name, ICalTimeZoneData *data );
162 
169  explicit ICalTimeZone( const KTimeZone &tz, const QDate &earliest = QDate() );
170 
174  virtual ~ICalTimeZone();
175 
182  QString city() const;
183 
189  QByteArray url() const;
190 
196  QDateTime lastModified() const;
197 
203  QByteArray vtimezone() const;
204 
212  icaltimezone *icalTimezone() const;
213 
226  bool update( const ICalTimeZone &other );
227 
238  static ICalTimeZone utc();
239 
240  private:
241  // d-pointer is in ICalTimeZoneBackend.
242  // This is a requirement for classes inherited from KTimeZone.
243 };
244 
258 class KCAL_DEPRECATED_EXPORT ICalTimeZoneBackend : public KTimeZoneBackend
259 {
260  public:
262  ICalTimeZoneBackend();
273  ICalTimeZoneBackend( ICalTimeZoneSource *source, const QString &name,
274  const QString &countryCode = QString(),
275  float latitude = KTimeZone::UNKNOWN,
276  float longitude = KTimeZone::UNKNOWN,
277  const QString &comment = QString() );
278 
284  ICalTimeZoneBackend( const KTimeZone &tz, const QDate &earliest );
285 
286  virtual ~ICalTimeZoneBackend();
287 
293  virtual KTimeZoneBackend *clone() const;
294 
300  virtual QByteArray type() const;
301 
310  virtual bool hasTransitions( const KTimeZone *caller ) const;
311 
312  private:
313  ICalTimeZonePrivate *d; //krazy:exclude=dpointer
314  //(non-const d-pointer for KTimeZoneBackend-derived classes)
315 };
316 
328 class KCAL_DEPRECATED_EXPORT ICalTimeZoneSource : public KTimeZoneSource
329 {
330  public:
334  ICalTimeZoneSource();
335 
339  virtual ~ICalTimeZoneSource();
340 
348  ICalTimeZone parse( icalcomponent *vtimezone );
349 
364  bool parse( icalcomponent *calendar, ICalTimeZones &zones );
365 
379  bool parse( const QString &fileName, ICalTimeZones &zones );
380 
393  ICalTimeZone parse( icaltimezone *tz );
394 
406  ICalTimeZone standardZone( const QString &zone, bool icalBuiltIn = false );
407 
416  static QByteArray icalTzidPrefix();
417 
418  using KTimeZoneSource::parse; // prevent warning about hidden virtual method
419 
420  private:
421  ICalTimeZoneSourcePrivate *const d;
422 };
423 
434 class KCAL_DEPRECATED_EXPORT ICalTimeZoneData : public KTimeZoneData
435 {
436  friend class ICalTimeZoneSource;
437 
438  public:
442  ICalTimeZoneData();
443 
449  ICalTimeZoneData( const ICalTimeZoneData &rhs );
450 
462  ICalTimeZoneData( const KTimeZoneData &rhs, const KTimeZone &tz, const QDate &earliest );
463 
467  virtual ~ICalTimeZoneData();
468 
475  ICalTimeZoneData &operator=( const ICalTimeZoneData &rhs );
476 
483  virtual KTimeZoneData *clone() const;
484 
491  QString city() const;
492 
498  QByteArray url() const;
499 
505  QDateTime lastModified() const;
506 
512  QByteArray vtimezone() const;
513 
521  icaltimezone *icalTimezone() const;
522 
528  virtual bool hasTransitions() const;
529 
530  private:
531  ICalTimeZoneDataPrivate *const d;
532 };
533 
534 }
535 
536 #endif
KCal::ICalTimeZoneBackend
Backend class for KICalTimeZone class.
Definition: icaltimezones.h:258
KCal::ICalTimeZones
The ICalTimeZones class represents a time zone database which consists of a collection of individual ...
Definition: icaltimezones.h:64
KCal::ICalTimeZoneSource
A class which reads and parses iCalendar VTIMEZONE components, and accesses libical time zone data...
Definition: icaltimezones.h:328
KCal::ICalTimeZoneData
Parsed iCalendar VTIMEZONE data.
Definition: icaltimezones.h:434
KCal::ICalTimeZone
The ICalTimeZone class represents an iCalendar VTIMEZONE component.
Definition: icaltimezones.h:142
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:57 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
  • 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