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

KDECore

Public Member Functions | List of all members
KSystemTimeZoneBackend Class Reference
Time zone classes

#include <ksystemtimezone.h>

Inheritance diagram for KSystemTimeZoneBackend:
Inheritance graph
[legend]

Public Member Functions

 KSystemTimeZoneBackend (KSystemTimeZoneSource *source, const QString &name, const QString &countryCode, float latitude, float longitude, const QString &comment)
 
 ~KSystemTimeZoneBackend ()
 
virtual KTimeZoneBackend * clone () const
 
virtual bool isDst (const KTimeZone *caller, time_t t) const
 
virtual bool isDstAtUtc (const KTimeZone *caller, const QDateTime &utcDateTime) const
 
virtual int offset (const KTimeZone *caller, time_t t) const
 
virtual int offsetAtUtc (const KTimeZone *caller, const QDateTime &utcDateTime) const
 
virtual int offsetAtZoneTime (const KTimeZone *caller, const QDateTime &zoneDateTime, int *secondOffset) const
 
virtual QByteArray type () const
 
- Public Member Functions inherited from KTimeZoneBackend
 KTimeZoneBackend ()
 
 KTimeZoneBackend (const QString &name)
 
 KTimeZoneBackend (const KTimeZoneBackend &other)
 
virtual ~KTimeZoneBackend ()
 
virtual bool hasTransitions (const KTimeZone *caller) const
 
KTimeZoneBackend & operator= (const KTimeZoneBackend &other)
 

Additional Inherited Members

- Protected Member Functions inherited from KTimeZoneBackend
 KTimeZoneBackend (KTimeZoneSource *source, const QString &name, const QString &countryCode=QString(), float latitude=KTimeZone::UNKNOWN, float longitude=KTimeZone::UNKNOWN, const QString &comment=QString())
 

Detailed Description

Backend class for KSystemTimeZone class.

This class implements KSystemTimeZone's constructors and virtual methods. A backend class is required for all classes inherited from KTimeZone to allow KTimeZone virtual methods to work together with reference counting of private data.

Backend class for KSystemTimeZone class

See also
KTimeZoneBackend, KSystemTimeZone, KTimeZone
Author
David Jarvie djarv.nosp@m.ie@k.nosp@m.de.or.nosp@m.g.

Definition at line 321 of file ksystemtimezone.h.

Constructor & Destructor Documentation

KSystemTimeZoneBackend::KSystemTimeZoneBackend ( KSystemTimeZoneSource *  source,
const QString &  name,
const QString &  countryCode,
float  latitude,
float  longitude,
const QString &  comment 
)

Implements KSystemTimeZone::KSystemTimeZone().

Definition at line 546 of file ksystemtimezone.cpp.

KSystemTimeZoneBackend::~KSystemTimeZoneBackend ( )

Definition at line 551 of file ksystemtimezone.cpp.

Member Function Documentation

KTimeZoneBackend * KSystemTimeZoneBackend::clone ( ) const
virtual

Creates a copy of this instance.

Returns
new copy

Reimplemented from KTimeZoneBackend.

Definition at line 554 of file ksystemtimezone.cpp.

bool KSystemTimeZoneBackend::isDst ( const KTimeZone *  caller,
time_t  t 
) const
virtual

Implements KSystemTimeZone::isDst().

Returns whether daylight savings time is in operation at a specified UTC time.

Parameters
callercalling KSystemTimeZone object
tthe UTC time, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned by time(2))
Returns
true if daylight savings time is in operation, false otherwise

Reimplemented from KTimeZoneBackend.

Definition at line 673 of file ksystemtimezone.cpp.

bool KSystemTimeZoneBackend::isDstAtUtc ( const KTimeZone *  caller,
const QDateTime &  utcDateTime 
) const
virtual

Implements KSystemTimeZone::isDstAtUtc().

Returns whether daylight savings time is in operation at the given UTC date/time.

Note that system times are represented using time_t. An error occurs if the date falls outside the range supported by time_t.

Parameters
callercalling KSystemTimeZone object
utcDateTimethe UTC date/time. An error occurs if utcDateTime.timeSpec() is not Qt::UTC.
Returns
true if daylight savings time is in operation, false otherwise

Reimplemented from KTimeZoneBackend.

Definition at line 668 of file ksystemtimezone.cpp.

int KSystemTimeZoneBackend::offset ( const KTimeZone *  caller,
time_t  t 
) const
virtual

Implements KSystemTimeZone::offset().

Returns the offset of this time zone to UTC at a specified UTC time.

The offset is the number of seconds which you must add to UTC to get local time in this time zone.

Parameters
callercalling KSystemTimeZone object
tthe UTC time at which the offset is to be calculated, measured in seconds since 00:00:00 UTC 1st January 1970 (as returned by time(2))
Returns
offset in seconds, or 0 if error

Reimplemented from KTimeZoneBackend.

Definition at line 638 of file ksystemtimezone.cpp.

int KSystemTimeZoneBackend::offsetAtUtc ( const KTimeZone *  caller,
const QDateTime &  utcDateTime 
) const
virtual

Implements KSystemTimeZone::offsetAtUtc().

Returns the offset of this time zone to UTC at the given UTC date/time.

The offset is the number of seconds which you must add to UTC to get local time in this time zone.

Note that system times are represented using time_t. An error occurs if the date falls outside the range supported by time_t.

Parameters
callercalling KSystemTimeZone object
utcDateTimethe UTC date/time at which the offset is to be calculated. An error occurs if utcDateTime.timeSpec() is not Qt::UTC.
Returns
offset in seconds, or 0 if error

Reimplemented from KTimeZoneBackend.

Definition at line 633 of file ksystemtimezone.cpp.

int KSystemTimeZoneBackend::offsetAtZoneTime ( const KTimeZone *  caller,
const QDateTime &  zoneDateTime,
int *  secondOffset 
) const
virtual

Implements KSystemTimeZone::offsetAtZoneTime().

Returns the offset of this time zone to UTC at the given local date/time. Because of daylight savings time shifts, the date/time may occur twice. Optionally, the offsets at both occurrences of dateTime are calculated.

The offset is the number of seconds which you must add to UTC to get local time in this time zone.

Parameters
callercalling KSystemTimeZone object
zoneDateTimethe date/time at which the offset is to be calculated. This is interpreted as a local time in this time zone. An error occurs if zoneDateTime.timeSpec() is not Qt::LocalTime.
secondOffsetif non-null, and the zoneDateTime occurs twice, receives the UTC offset for the second occurrence. Otherwise, it is set the same as the return value.
Returns
offset in seconds. If zoneDateTime occurs twice, it is the offset at the first occurrence which is returned.

Reimplemented from KTimeZoneBackend.

Definition at line 564 of file ksystemtimezone.cpp.

QByteArray KSystemTimeZoneBackend::type ( ) const
virtual

Returns the class name of the data represented by this instance.

Returns
"KSystemTimeZone"

Reimplemented from KTimeZoneBackend.

Definition at line 559 of file ksystemtimezone.cpp.


The documentation for this class was generated from the following files:
  • ksystemtimezone.h
  • ksystemtimezone.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:22:13 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDECore

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal