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

KDECore

  • sources
  • kde-4.12
  • kdelibs
  • kdecore
  • date
ktzfiletimezone.h
Go to the documentation of this file.
1 /*
2  This file is part of the KDE libraries
3  Copyright (c) 2005-2008 David Jarvie <djarvie@kde.org>
4 
5  This library is free software; you can redistribute it and/or
6  modify it under the terms of the GNU Library General Public
7  License as published by the Free Software Foundation; either
8  version 2 of the License, or (at your option) any later version.
9 
10  This library is distributed in the hope that it will be useful,
11  but WITHOUT ANY WARRANTY; without even the implied warranty of
12  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  Library General Public License for more details.
14 
15  You should have received a copy of the GNU Library General Public License
16  along with this library; see the file COPYING.LIB. If not, write to
17  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  Boston, MA 02110-1301, USA.
19 */
20 
26 #ifndef _KTZFILETIMEZONE_H
27 #define _KTZFILETIMEZONE_H
28 
29 #include <kdecore_export.h>
30 #include <ktimezone.h>
31 
32 #include <QtCore/QString>
33 
34 class KTzfileTimeZoneSource;
35 class KTzfileTimeZonePrivate;
36 class KTzfileTimeZoneDataPrivate;
37 class KTzfileTimeZoneSourcePrivate;
38 
50 class KDECORE_EXPORT KTzfileTimeZone : public KTimeZone //krazy:exclude=dpointer (no d-pointer for KTimeZone derived classes)
51 {
52 public:
64  KTzfileTimeZone(KTzfileTimeZoneSource *source, const QString &name,
65  const QString &countryCode = QString(), float latitude = UNKNOWN, float longitude = UNKNOWN,
66  const QString &comment = QString());
67 
68  ~KTzfileTimeZone();
69 
70 private:
71  // d-pointer is in KTzfileTimeZoneBackend.
72  // This is a requirement for classes inherited from KTimeZone.
73 };
74 
75 
89 class KDECORE_EXPORT KTzfileTimeZoneBackend : public KTimeZoneBackend //krazy:exclude=dpointer (non-const d-pointer for KTimeZoneBackend-derived classes)
90 {
91 public:
93  KTzfileTimeZoneBackend(KTzfileTimeZoneSource *source, const QString &name,
94  const QString &countryCode, float latitude, float longitude, const QString &comment);
95 
96  ~KTzfileTimeZoneBackend();
97 
103  virtual KTimeZoneBackend *clone() const;
104 
110  virtual QByteArray type() const;
111 
120  virtual bool hasTransitions(const KTimeZone* caller) const;
121 
122 private:
123  KTzfileTimeZonePrivate *d; // non-const
124 };
125 
126 
138 class KDECORE_EXPORT KTzfileTimeZoneSource : public KTimeZoneSource
139 {
140 public:
151  explicit KTzfileTimeZoneSource(const QString &location);
152  virtual ~KTzfileTimeZoneSource();
153 
159  QString location() const;
160 
169  virtual KTimeZoneData *parse(const KTimeZone &zone) const;
170 
171 private:
172  KTzfileTimeZoneSourcePrivate * const d;
173 };
174 
175 
185 class KTzfileTimeZoneData : public KTimeZoneData
186 {
187  friend class KTzfileTimeZoneSource;
188 
189 public:
190  KTzfileTimeZoneData();
191  KTzfileTimeZoneData(const KTzfileTimeZoneData &);
192  virtual ~KTzfileTimeZoneData();
193 
194  KTzfileTimeZoneData &operator=(const KTzfileTimeZoneData &);
195 
204  virtual KTimeZoneData *clone() const;
205 
211  virtual bool hasTransitions() const;
212 
213 private:
214  // Enable this if you add KDECORE_EXPORT to this class
215  //KTzfileTimeZoneDataPrivate * const d;
216 };
217 
218 #endif
KTzfileTimeZoneData::clone
virtual KTimeZoneData * clone() const
Creates a new copy of this object.
Definition: ktzfiletimezone.cpp:123
KTzfileTimeZoneData::~KTzfileTimeZoneData
virtual ~KTzfileTimeZoneData()
Definition: ktzfiletimezone.cpp:112
KTimeZoneBackend::hasTransitions
virtual bool hasTransitions(const KTimeZone *caller) const
Implements KTimeZone::hasTransitions().
Definition: ktimezone.cpp:582
KTimeZoneBackend::type
virtual QByteArray type() const
Returns the class name of the data represented by this instance.
Definition: ktimezone.cpp:457
kdecore_export.h
KTimeZoneData
Base class for the parsed data returned by a KTimeZoneSource class.
Definition: ktimezone.h:1302
KTzfileTimeZoneData
Parsed data from tzfile(5) time zone definition files.
Definition: ktzfiletimezone.h:185
KTimeZoneSource::parse
virtual KTimeZoneData * parse(const KTimeZone &zone) const
Extracts detail information for one time zone from the source database.
Definition: ktimezone.cpp:976
QString
KTzfileTimeZoneData::KTzfileTimeZoneData
KTzfileTimeZoneData()
Definition: ktzfiletimezone.cpp:102
KTzfileTimeZoneBackend
Backend class for KTzfileTimeZone class.
Definition: ktzfiletimezone.h:89
KTzfileTimeZoneData::hasTransitions
virtual bool hasTransitions() const
Return whether daylight saving transitions are available for the time zone.
Definition: ktzfiletimezone.cpp:128
KTimeZoneBackend::clone
virtual KTimeZoneBackend * clone() const
Creates a copy of this instance.
Definition: ktimezone.cpp:462
KTzfileTimeZone
The KTzfileTimeZone class represents a time zone defined in tzfile(5) format.
Definition: ktzfiletimezone.h:50
ktimezone.h
Time zone functions.
KTimeZone
Base class representing a time zone.
Definition: ktimezone.h:416
KTzfileTimeZoneData::operator=
KTzfileTimeZoneData & operator=(const KTzfileTimeZoneData &)
Definition: ktzfiletimezone.cpp:117
KTimeZoneSource
Base class representing a source of time zone information.
Definition: ktimezone.h:1230
KTimeZoneBackend
Base backend class for KTimeZone classes.
Definition: ktimezone.h:1120
KTzfileTimeZoneSource
A class to read and parse tzfile time zone definition files.
Definition: ktzfiletimezone.h:138
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:09 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
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • 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