KHolidays Library
holidayregion.h
00001 /* 00002 This file is part of the kholidays library. 00003 00004 Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org> 00005 Copyright (c) 2004 Allen Winter <winter@kde.org> 00006 Copyright (c) 2008 David Jarvie <djarvie@kde.org> 00007 Copyright 2010 John Layt <john@layt.net> 00008 00009 This library is free software; you can redistribute it and/or 00010 modify it under the terms of the GNU Library General Public 00011 License as published by the Free Software Foundation; either 00012 version 2 of the License, or (at your option) any later version. 00013 00014 This library is distributed in the hope that it will be useful, 00015 but WITHOUT ANY WARRANTY; without even the implied warranty of 00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00017 GNU Library General Public License for more details. 00018 00019 You should have received a copy of the GNU Library General Public License 00020 along with this library; see the file COPYING.LIB. If not, write to the 00021 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00022 Boston, MA 02110-1301, USA. 00023 */ 00024 00025 #ifndef KHOLIDAYS_HOLIDAYREGION_H 00026 #define KHOLIDAYS_HOLIDAYREGION_H 00027 00028 #include "kholidays_export.h" 00029 00030 #include <QtCore/QList> 00031 #include <QtCore/QSharedDataPointer> 00032 #include <QtCore/QString> 00033 00034 #include "holiday.h" 00035 00036 class QDate; 00037 class QStringList; 00038 class QFileInfo; 00039 00040 namespace KHolidays { 00041 00042 class KHOLIDAYS_EXPORT HolidayRegion 00043 { 00044 public: 00055 explicit HolidayRegion( const QString ®ionCode = QString() ); 00056 00063 explicit HolidayRegion( const QFileInfo ®ionFile ); 00064 00068 ~HolidayRegion(); 00069 00080 static QStringList locations(); 00081 00095 QString location() const; 00096 00108 static QStringList regionCodes(); 00109 00122 static QString defaultRegionCode( const QString &country = QString(), 00123 const QString &language = QString() ); 00124 00135 QString regionCode() const; 00136 00149 QString countryCode() const; 00150 00164 static QString countryCode( const QString ®ionCode ); 00165 00176 QString languageCode() const; 00177 00189 static QString languageCode( const QString ®ionCode ); 00190 00199 QString name() const; 00200 00209 static QString name( const QString ®ionCode ); 00210 00218 QString description() const; 00219 00227 static QString description( const QString ®ionCode ); 00228 00234 Holiday::List holidays( const QDate &startDate, const QDate &endDate ) const; 00235 00236 //KDE5: merge with default multidayMode 00242 Holiday::List holidays( const QDate &startDate, const QDate &endDate, 00243 Holiday::MultidayMode multidayMode ) const; 00244 00248 Holiday::List holidays( const QDate &date ) const; 00249 00250 //KDE5: merge with default multidayMode 00256 Holiday::List holidays( const QDate &date, Holiday::MultidayMode multidayMode ) const; 00257 00263 Holiday::List holidays( int calendarYear, const QString &calendarType ) const; 00264 00265 //KDE5: merge with default multidayMode 00271 Holiday::List holidays( int calendarYear, const QString &calendarType, 00272 Holiday::MultidayMode multidayMode ) const; 00273 00277 bool isHoliday( const QDate &date ) const; 00278 00282 bool isValid() const; 00283 00289 static bool isValid( const QString ®ionCode ); 00290 00291 private: 00292 Q_DISABLE_COPY( HolidayRegion ) 00293 00294 class Private; 00295 Private *const d; 00296 }; 00297 00298 } 00299 00300 #endif // KHOLIDAYS_HOLIDAYREGION_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:21 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu Aug 2 2012 15:24:21 by doxygen 1.7.5 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.