KHolidays Library
holiday.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_HOLIDAY_H 00026 #define KHOLIDAYS_HOLIDAY_H 00027 00028 #include "kholidays_export.h" 00029 00030 #include <QtCore/QList> 00031 #include <QtCore/QSharedDataPointer> 00032 00033 class QDate; 00034 class QString; 00035 00036 namespace KHolidays { 00037 00038 class HolidayPrivate; 00039 class HolidayRegion; 00040 00041 class KHOLIDAYS_EXPORT Holiday 00042 { 00043 friend class HolidayRegion; 00044 friend class HolidayParserDriverPlan; 00045 friend class HolidayParserDriverPlanOld; 00046 00047 public: 00051 typedef QList<Holiday> List; 00052 00056 enum DayType { 00057 Workday, 00058 NonWorkday 00059 }; 00060 00064 enum MultidayMode { 00065 MultidayHolidaysAsMultipleEvents, 00066 MultidayHolidaysAsSingleEvents 00067 }; 00068 00072 Holiday(); 00073 00077 Holiday( const Holiday &other ); 00078 00082 ~Holiday(); 00083 00087 Holiday &operator=( const Holiday &other ); 00088 00092 bool operator<( const Holiday &rhs ) const; 00093 00097 bool operator>( const Holiday &rhs ) const; 00098 00102 QDate date() const; 00103 00109 QDate observedStartDate() const; 00110 00116 QDate observedEndDate() const; 00117 00123 int duration() const; 00124 00128 QString text() const; 00129 00133 QString shortText() const; 00134 00138 DayType dayType() const; 00139 00140 private: 00141 QSharedDataPointer<HolidayPrivate> d; 00142 }; 00143 00144 } 00145 00146 #endif // KHOLIDAYS_HOLIDAY_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:30 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2012 The KDE developers.
Generated on Mon Apr 30 2012 21:48:30 by doxygen 1.8.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.