KTimeZones

#include <ktimezone.h>

Inherited by KSystemTimeZonesPrivate.

Public Types

typedef QMap< QString, KTimeZoneZoneMap
 

Public Member Functions

bool add (const KTimeZone &zone)
 
void clear ()
 
KTimeZone remove (const KTimeZone &zone)
 
KTimeZone remove (const QString &name)
 
KTimeZone zone (const QString &name) const
 
const ZoneMap zones () const
 

Detailed Description

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

Each individual time zone is defined in a KTimeZone instance, which provides generic support for private or system time zones. The time zones in the collection are indexed by name, which must be unique within the collection.

Different time zone sources could define the same time zone differently. (For example, a calendar file originating from another system might hold its own time zone definitions, which may not necessarily be identical to your own system's definitions.) In order to keep conflicting definitions separate, it will often be necessary when dealing with multiple time zone sources to create a separate KTimeZones instance for each source collection.

If you want to access system time zones, use the KSystemTimeZones class.

Represents a time zone database or collection

Author
David Jarvie djarv[email protected][email protected][email protected]de.or[email protected]g.
S.R.Haque srhaq[email protected][email protected][email protected]ee.or[email protected]g.

Definition at line 308 of file ktimezone.h.

Member Typedef Documentation

Map of KTimeZone instances, indexed by time zone name.

Definition at line 323 of file ktimezone.h.

Member Function Documentation

bool KTimeZones::add ( const KTimeZone 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
See also
remove()

Definition at line 67 of file ktimezone.cpp.

void KTimeZones::clear ( )

Clears the collection.

See also
remove()

Definition at line 105 of file ktimezone.cpp.

KTimeZone KTimeZones::remove ( const KTimeZone 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
See also
clear(), add()

Definition at line 79 of file ktimezone.cpp.

KTimeZone KTimeZones::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
See also
clear(), add()

Definition at line 92 of file ktimezone.cpp.

KTimeZone KTimeZones::zone ( const QString name) const

Returns the time zone with the given name.

Parameters
namename of time zone
Returns
time zone, or 0 if not found

Definition at line 110 of file ktimezone.cpp.

const KTimeZones::ZoneMap KTimeZones::zones ( ) const

Returns all the time zones defined in this collection.

Returns
time zone collection, indexed by time zone name

Definition at line 62 of file ktimezone.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Sun Aug 2 2020 22:57:30 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.