• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

KCalCore Library

  • KCalCore
  • ICalTimeZones
Public Types | Public Member Functions

KCalCore::ICalTimeZones Class Reference

The ICalTimeZones class represents a time zone database which consists of a collection of individual iCalendar time zone definitions. More...

#include <icaltimezones.h>

List of all members.

Public Types

typedef QMap< QString,
ICalTimeZone > 
ZoneMap

Public Member Functions

 ICalTimeZones ()
 ICalTimeZones (const ICalTimeZones &rhs)
 ~ICalTimeZones ()
bool add (const ICalTimeZone &zone)
void clear ()
int count ()
ICalTimeZones & operator= (const ICalTimeZones &rhs)
ICalTimeZone remove (const ICalTimeZone &zone)
ICalTimeZone remove (const QString &name)
ICalTimeZone zone (const QString &name) const
ICalTimeZone zone (const ICalTimeZone &zone) const
const ZoneMap zones () const

Detailed Description

The ICalTimeZones class represents a time zone database which consists of a collection of individual iCalendar time zone definitions.

Each individual time zone is defined in a ICalTimeZone instance. The time zones in the collection are indexed by name, which must be unique within the collection.

Different calendars could define the same time zone differently. As a result, to avoid conflicting definitions, each calendar should normally have its own ICalTimeZones collection.

This class is analogous to KTimeZones, but holds ICalTimeZone instances rather than generic KTimeZone instances.

Represents a collection of iCalendar time zones

Author:
David Jarvie <software@astrojar.org.uk>.

Definition at line 65 of file icaltimezones.h.


Constructor & Destructor Documentation

KCalCore::ICalTimeZones::ICalTimeZones ( )

Constructs an empty time zone collection.

Definition at line 101 of file icaltimezones.cpp.

KCalCore::ICalTimeZones::ICalTimeZones ( const ICalTimeZones &  rhs)

Copy constructor.

Parameters:
rhsis the ICalTimeZones instance to copy.

Definition at line 106 of file icaltimezones.cpp.

KCalCore::ICalTimeZones::~ICalTimeZones ( )

Destructor.

Definition at line 122 of file icaltimezones.cpp.


Member Function Documentation

bool KCalCore::ICalTimeZones::add ( const ICalTimeZone &  zone)

Adds a time zone to the collection.

The time zone's name must be unique within the collection.

Parameters:
zonetime zone to add
Returns:
true if successful, false if zone's name duplicates one already in the collection

Definition at line 132 of file icaltimezones.cpp.

void KCalCore::ICalTimeZones::clear ( )

Clears the collection.

Definition at line 171 of file icaltimezones.cpp.

int KCalCore::ICalTimeZones::count ( )

Returns the number of zones kept in memory.

Returns:
The number of zones

Definition at line 176 of file icaltimezones.cpp.

ICalTimeZones & KCalCore::ICalTimeZones::operator= ( const ICalTimeZones &  rhs)

Assignment operator.

Parameters:
rhsis the ICalTimeZones instance to assign to this one.

Definition at line 112 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZones::remove ( const QString &  name)

Removes a time zone from the collection.

Parameters:
namename of time zone to remove
Returns:
the time zone which was removed, or invalid if not found

Definition at line 158 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZones::remove ( const ICalTimeZone &  zone)

Removes a time zone from the collection.

Parameters:
zonetime zone to remove
Returns:
the time zone which was removed, or invalid if not found

Definition at line 145 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZones::zone ( const ICalTimeZone &  zone) const

Returns the time zone with similar zone information regardless of the time zone names.

This feature was added for Microsoft ActiveSync which may have the same timezone specification separately for every incidence. Note that the ICalTimeZone returned remains a member of the ICalTimeZones collection, and should not be deleted without calling remove() first.

See also:
ICalTimeZone parse( MSTimeZone *tz, ICalTimeZones &zones );
Parameters:
zonezone information to look for
Returns:
time zone, or invalid if not found

Definition at line 192 of file icaltimezones.cpp.

ICalTimeZone KCalCore::ICalTimeZones::zone ( const QString &  name) const

Returns the time zone with the given name.

Note that the ICalTimeZone returned remains a member of the ICalTimeZones collection, and should not be deleted without calling remove() first.

Parameters:
namename of time zone
Returns:
time zone, or invalid if not found

Definition at line 181 of file icaltimezones.cpp.

const ICalTimeZones::ZoneMap KCalCore::ICalTimeZones::zones ( ) const

Returns all the time zones defined in this collection.

Returns:
time zone collection

Definition at line 127 of file icaltimezones.cpp.


The documentation for this class was generated from the following files:
  • icaltimezones.h
  • icaltimezones.cpp

KCalCore Library

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

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal