kabc
23 #include <QtCore/QDataStream>
24 #include <QtCore/QSharedData>
28 class TimeZone::Private :
public QSharedData
31 Private(
int offset = 0,
bool valid =
false )
32 : mOffset(
offset ), mValid( valid )
36 Private(
const Private &other )
37 : QSharedData( other )
39 mOffset = other.mOffset;
40 mValid = other.mValid;
53 : d( new Private( offset, true ) )
82 bool TimeZone::operator==(
const TimeZone &t )
const
92 if ( t.d->mOffset == d->mOffset ) {
99 bool TimeZone::operator!=(
const TimeZone &t )
const
101 return !( *
this == t );
106 if (
this != &other ) {
117 str += QString::fromLatin1(
"TimeZone {\n" );
118 str += QString::fromLatin1(
" Offset: %1\n" ).arg( d->mOffset );
119 str += QString::fromLatin1(
"}\n" );
124 QDataStream &KABC::operator<<( QDataStream &s,
const TimeZone &zone )
126 return s << zone.d->mOffset << zone.d->mValid;
129 QDataStream &KABC::operator>>( QDataStream &s,
TimeZone &zone )
131 s >> zone.d->mOffset >> zone.d->mValid;
void setOffset(int offset)
Set time zone offset relative to UTC.
bool isValid() const
Return, if this time zone object is valid.
int offset() const
Return offset in minutes relative to UTC.
TimeZone()
Construct invalid time zone.
~TimeZone()
Destroys the time zone.
QString toString() const
Return string representation of time zone offset.
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:01:05 by
doxygen 1.8.7 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.