• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDECore

KTimeZones Class Reference
[Time zone classes]

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

#include <ktimezone.h>

Inherited by KSystemTimeZonesPrivate.

List of all members.


Public Types

typedef QMap< QString, KTimeZone > ZoneMap

Public Member Functions

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

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 <djarvie@kde.org>.

S.R.Haque <srhaque@iee.org>.

Definition at line 308 of file ktimezone.h.


Member Typedef Documentation

typedef QMap<QString, KTimeZone> KTimeZones::ZoneMap

Definition at line 322 of file ktimezone.h.


Constructor & Destructor Documentation

KTimeZones::KTimeZones (  ) 

Definition at line 58 of file ktimezone.cpp.

KTimeZones::~KTimeZones (  ) 

Definition at line 63 of file ktimezone.cpp.


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:
zone time zone to add
Returns:
true if successful, false if zone's name duplicates one already in the collection
See also:
remove()

Definition at line 73 of file ktimezone.cpp.

void KTimeZones::clear (  ) 

Clears the collection.

See also:
remove()

Definition at line 114 of file ktimezone.cpp.

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

Definition at line 99 of file ktimezone.cpp.

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

Definition at line 83 of file ktimezone.cpp.

KTimeZone KTimeZones::zone ( const QString &  name  )  const

Returns the time zone with the given name.

Parameters:
name name of time zone
Returns:
time zone, or 0 if not found

Definition at line 119 of file ktimezone.cpp.

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

Returns all the time zones defined in this collection.

Returns:
time zone collection

Definition at line 68 of file ktimezone.cpp.


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

KDECore

Skip menu "KDECore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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