KTimezone Class Reference
#include <ktimezones.h>
Detailed Description
The KTimezone class contains core functions related to a timezone.Instances are created in the context of a KTimezoneSource which provides extended functionality via KTimezoneDetails.
- See also:
- KTimezoneSource
- Since:
- 3.5
- Author:
- S.R.Haque <srhaque@iee.org>.
Definition at line 84 of file ktimezones.h.
Public Member Functions | |
KTimezone (KSharedPtr< KTimezoneSource > db, const QString &name, const QString &countryCode=QString(), float latitude=UNKNOWN, float longitude=UNKNOWN, const QString &comment=QString()) | |
~KTimezone () | |
QString | name () const |
QString | countryCode () const |
float | latitude () const |
float | longitude () const |
int | offset (Qt::TimeSpec basisSpec=Qt::UTC) const |
int | offset (const QDateTime &dateTime) const |
QDateTime | convert (const KTimezone *newZone, const QDateTime &dateTime) const |
QString | comment () const |
bool | parse (KTimezoneDetails &dataReceiver) const |
Static Public Member Functions | |
static bool | isValidLatitude (float latitude) |
static bool | isValidLongitude (float longitude) |
Static Public Attributes | |
static const float | UNKNOWN = 1000.0 |
Constructor & Destructor Documentation
|
Create a timezone.
Definition at line 205 of file ktimezones.cpp. |
Member Function Documentation
|
Returns any comment for the timezone.
Definition at line 230 of file ktimezones.cpp. |
|
Convert a date/time (which is interpreted as being localtime in this timezone) into localtime in the given timezone.
Definition at line 235 of file ktimezones.cpp. |
|
Returns the two-letter country code of the timezone.
Definition at line 263 of file ktimezones.cpp. |
|
A test for a valid latitude. The valid range is +90.0 (North Pole) to -90.0 (South Pole). Definition at line 195 of file ktimezones.cpp. |
|
A test for a valid longitude. The valid range is +180.0 (east of Greenwich) to -180.0 (west of Greenwich). Definition at line 200 of file ktimezones.cpp. |
|
Returns the latitude of the timezone.
Definition at line 268 of file ktimezones.cpp. |
|
Returns the latitude of the timezone.
Definition at line 273 of file ktimezones.cpp. |
|
Returns the name of the timezone.
Definition at line 278 of file ktimezones.cpp. |
|
Returns the offset of the given timezone to UTC at the given date/time (which is interpreted as being UTC).
Definition at line 309 of file ktimezones.cpp. |
|
Returns the current offset of this timezone to UTC or the local timezone in seconds. Take care if you cache the results of this routine; that would break if the result were stored across a daylight savings change.
Definition at line 283 of file ktimezones.cpp. |
|
Extract timezone detail information.
Definition at line 320 of file ktimezones.cpp. |
Member Data Documentation
|
A representation for unknown locations; this is a float that does not represent a real latitude or longitude.
Definition at line 91 of file ktimezones.h. |
The documentation for this class was generated from the following files: