KDECore
kcalendarera_p.h
Go to the documentation of this file.
00001 /* 00002 Copyright 2010 John Layt <john@layt.net> 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library is distributed in the hope that it will be useful, 00010 but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 Boston, MA 02110-1301, USA. 00018 */ 00019 00020 #ifndef KCALENDARERA_H 00021 #define KCALENDARERA_H 00022 00023 #include <QtCore/QString> 00024 #include <QtCore/QDate> 00025 00026 #include "klocale.h" 00027 00028 class KCalendarSystemPrivate; 00029 00043 class KCalendarEra 00044 { 00045 public: 00046 explicit KCalendarEra(); 00047 virtual ~KCalendarEra(); 00048 00049 bool isValid() const; 00050 00051 int sequence() const; 00052 QDate startDate() const; 00053 QDate endDate() const; 00054 QString name(KLocale::DateTimeComponentFormat format = KLocale::DefaultComponentFormat) const; 00055 QString format() const; 00056 int direction() const; 00057 int offset() const; 00058 00059 bool isInEra( const QDate &date ) const; 00060 int yearInEra( int year ) const; 00061 int year( int yearInEra ) const; 00062 00063 private: 00064 friend class KCalendarSystemPrivate; 00065 00066 int m_sequence; 00067 QDate m_startDate; 00068 int m_startYear; 00069 QDate m_endDate; 00070 QString m_longName; 00071 QString m_shortName; 00072 QString m_format; 00073 int m_direction; 00074 int m_offset; 00075 }; 00076 00077 #endif // KCALENDARERA_H
KDE 4.6 API Reference