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

KDECore

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

#include <ktimezone.h>

Inheritance diagram for KTimeZoneBackend:
Inheritance graph
[legend]

Public Member Functions

 KTimeZoneBackend ()
 
 KTimeZoneBackend (const QString &name)
 
 KTimeZoneBackend (const KTimeZoneBackend &other)
 
virtual ~KTimeZoneBackend ()
 
virtual KTimeZoneBackend * clone () const
 
virtual bool hasTransitions (const KTimeZone *caller) 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
 
KTimeZoneBackend & operator= (const KTimeZoneBackend &other)
 
virtual QByteArray type () const
 

Protected Member Functions

 KTimeZoneBackend (KTimeZoneSource *source, const QString &name, const QString &countryCode=QString(), float latitude=KTimeZone::UNKNOWN, float longitude=KTimeZone::UNKNOWN, const QString &comment=QString())
 

Detailed Description

Base backend class for KTimeZone classes.

KTimeZone and each class inherited from it must have a corresponding backend class to implement its constructors and its virtual methods, and to provide a virtual clone() method. This allows KTimeZone virtual methods to work together with reference counting of private data.

Note
Classes derived from KTimeZoneBackend should not normally implement their own copy constructor or assignment operator, and must have a non-const d-pointer.

Base backend class for KTimeZone classes

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

Definition at line 1120 of file ktimezone.h.

Constructor & Destructor Documentation

KTimeZoneBackend::KTimeZoneBackend ( )

Implements KTimeZone::KTimeZone().

Definition at line 417 of file ktimezone.cpp.

KTimeZoneBackend::KTimeZoneBackend ( const QString &  name)
explicit

Implements KTimeZone::KTimeZone(const QString&).

Definition at line 423 of file ktimezone.cpp.

KTimeZoneBackend::KTimeZoneBackend ( const KTimeZoneBackend &  other)

Definition at line 432 of file ktimezone.cpp.

KTimeZoneBackend::~KTimeZoneBackend ( )
virtual

Definition at line 438 of file ktimezone.cpp.

KTimeZoneBackend::KTimeZoneBackend ( KTimeZoneSource *  source,
const QString &  name,
const QString &  countryCode = QString(),
float  latitude = KTimeZone::UNKNOWN,
float  longitude = KTimeZone::UNKNOWN,
const QString &  comment = QString() 
)
protected

Constructs a time zone.

Parameters
sourcereader/parser for the database containing this time zone. This will be an instance of a class derived from KTimeZoneSource.
namein system-dependent format. The name must be unique within any KTimeZones instance which contains this KTimeZone.
countryCodeISO 3166 2-character country code, empty if unknown
latitudein degrees (between -90 and +90), UNKNOWN if not known
longitudein degrees (between -180 and +180), UNKNOWN if not known
commentdescription of the time zone, if any

Definition at line 427 of file ktimezone.cpp.

Member Function Documentation

KTimeZoneBackend * KTimeZoneBackend::clone ( ) const
virtual

Creates a copy of this instance.

Note
Every inherited class must reimplement clone().
Returns
new copy

Reimplemented in KSystemTimeZoneBackend, and KTzfileTimeZoneBackend.

Definition at line 462 of file ktimezone.cpp.

bool KTimeZoneBackend::hasTransitions ( const KTimeZone *  caller) const
virtual

Implements KTimeZone::hasTransitions().

Parameters
callercalling KTimeZone object

Reimplemented in KTzfileTimeZoneBackend.

Definition at line 582 of file ktimezone.cpp.

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

Implements KTimeZone::isDst().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 577 of file ktimezone.cpp.

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

Implements KTimeZone::isDstAtUtc().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 567 of file ktimezone.cpp.

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

Implements KTimeZone::offset().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 562 of file ktimezone.cpp.

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

Implements KTimeZone::offsetAtUtc().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 530 of file ktimezone.cpp.

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

Implements KTimeZone::offsetAtZoneTime().

Parameters
callercalling KTimeZone object

Reimplemented in KSystemTimeZoneBackend.

Definition at line 467 of file ktimezone.cpp.

KTimeZoneBackend & KTimeZoneBackend::operator= ( const KTimeZoneBackend &  other)

Definition at line 445 of file ktimezone.cpp.

QByteArray KTimeZoneBackend::type ( ) const
virtual

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

Note
Every inherited class must reimplement type().

This base class returns "KTimeZone".

Returns
the class name

Reimplemented in KSystemTimeZoneBackend, and KTzfileTimeZoneBackend.

Definition at line 457 of file ktimezone.cpp.


The documentation for this class was generated from the following files:
  • ktimezone.h
  • ktimezone.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