timezone.h
00001 /* 00002 This file is part of libkabc. 00003 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00004 00005 This library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Library General Public 00007 License as published by the Free Software Foundation; either 00008 version 2 of the License, or (at your option) any later version. 00009 00010 This library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Library General Public License for more details. 00014 00015 You should have received a copy of the GNU Library General Public License 00016 along with this library; see the file COPYING.LIB. If not, write to 00017 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00018 Boston, MA 02111-1307, USA. 00019 */ 00020 00021 #ifndef KABC_TIMEZONE_H 00022 #define KABC_TIMEZONE_H 00023 00024 #include <qstring.h> 00025 00026 namespace KABC { 00027 00033 class TimeZone 00034 { 00035 friend QDataStream &operator<<( QDataStream &, const TimeZone & ); 00036 friend QDataStream &operator>>( QDataStream &, TimeZone & ); 00037 00038 public: 00039 00043 TimeZone(); 00044 00050 TimeZone( int offset ); 00051 00057 void setOffset( int ); 00058 00062 int offset() const; 00063 00067 bool isValid() const; 00068 00069 bool operator==( const TimeZone & ) const; 00070 bool operator!=( const TimeZone & ) const; 00071 00075 QString asString() const; 00076 00077 private: 00078 int mOffset; // Offset in minutes 00079 00080 bool mValid; 00081 }; 00082 00083 QDataStream &operator<<( QDataStream &, const TimeZone & ); 00084 QDataStream &operator>>( QDataStream &, TimeZone & ); 00085 00086 } 00087 #endif