KCalCore Library
#include <icaltimezones.h>
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 ICalTimeZone &zone) const |
ICalTimeZone | zone (const QString &name) 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
Definition at line 65 of file icaltimezones.h.
Member Typedef Documentation
◆ ZoneMap
typedef QMap<QString, ICalTimeZone> KCalCore::ICalTimeZones::ZoneMap |
Definition at line 114 of file icaltimezones.h.
Constructor & Destructor Documentation
◆ ICalTimeZones() [1/2]
KCalCore::ICalTimeZones::ICalTimeZones | ( | ) |
Constructs an empty time zone collection.
Definition at line 100 of file icaltimezones.cpp.
◆ ICalTimeZones() [2/2]
KCalCore::ICalTimeZones::ICalTimeZones | ( | const ICalTimeZones & | rhs | ) |
Copy constructor.
- Parameters
-
rhs is the ICalTimeZones instance to copy.
Definition at line 105 of file icaltimezones.cpp.
◆ ~ICalTimeZones()
KCalCore::ICalTimeZones::~ICalTimeZones | ( | ) |
Destructor.
Definition at line 121 of file icaltimezones.cpp.
Member Function Documentation
◆ add()
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
-
zone time zone to add
- Returns
true
if successful,false
if zone's name duplicates one already in the collection
Definition at line 131 of file icaltimezones.cpp.
◆ clear()
void KCalCore::ICalTimeZones::clear | ( | ) |
Clears the collection.
Definition at line 170 of file icaltimezones.cpp.
◆ count()
int KCalCore::ICalTimeZones::count | ( | ) |
Returns the number of zones kept in memory.
- Returns
- The number of zones
Definition at line 175 of file icaltimezones.cpp.
◆ operator=()
ICalTimeZones & KCalCore::ICalTimeZones::operator= | ( | const ICalTimeZones & | rhs | ) |
Assignment operator.
- Parameters
-
rhs is the ICalTimeZones instance to assign to this one.
Definition at line 111 of file icaltimezones.cpp.
◆ remove() [1/2]
ICalTimeZone KCalCore::ICalTimeZones::remove | ( | const ICalTimeZone & | zone | ) |
Removes a time zone from the collection.
- Parameters
-
zone time zone to remove
- Returns
- the time zone which was removed, or invalid if not found
Definition at line 144 of file icaltimezones.cpp.
◆ remove() [2/2]
ICalTimeZone KCalCore::ICalTimeZones::remove | ( | const QString & | name | ) |
Removes a time zone from the collection.
- Parameters
-
name name of time zone to remove
- Returns
- the time zone which was removed, or invalid if not found
Definition at line 157 of file icaltimezones.cpp.
◆ zone() [1/2]
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
-
zone zone information to look for
- Returns
- time zone, or invalid if not found
Definition at line 191 of file icaltimezones.cpp.
◆ zone() [2/2]
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
-
name name of time zone
- Returns
- time zone, or invalid if not found
Definition at line 180 of file icaltimezones.cpp.
◆ zones()
const ICalTimeZones::ZoneMap KCalCore::ICalTimeZones::zones | ( | ) | const |
Returns all the time zones defined in this collection.
- Returns
- time zone collection
Definition at line 126 of file icaltimezones.cpp.
The documentation for this class was generated from the following files:
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.