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.
int offset() const
Return offset in minutes relative to UTC.
QString toString() const
Return string representation of time zone offset.
TimeZone()
Construct invalid time zone.
~TimeZone()
Destroys the time zone.
bool isValid() const
Return, if this time zone object is valid.
This file is part of the KDE documentation.
Documentation copyright © 1996-2018 The KDE developers.
Generated on Fri Oct 19 2018 17:57:47 by
doxygen 1.8.13 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.