• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • Sitemap
  • Contact Us
 

KHolidays Library

holidays.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 
00008   This library is free software; you can redistribute it and/or
00009   modify it under the terms of the GNU Library General Public
00010   License as published by the Free Software Foundation; either
00011   version 2 of the License, or (at your option) any later version.
00012 
00013   This library is distributed in the hope that it will be useful,
00014   but WITHOUT ANY WARRANTY; without even the implied warranty of
00015   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016   GNU Library General Public License for more details.
00017 
00018   You should have received a copy of the GNU Library General Public License
00019   along with this library; see the file COPYING.LIB.  If not, write to the
00020   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00021   Boston, MA 02110-1301, USA.
00022 */
00023 #ifndef KHOLIDAYS_HOLIDAYS_H
00024 #define KHOLIDAYS_HOLIDAYS_H
00025 
00026 #include "kholidays_export.h"
00027 
00028 #include <QtCore/QList>
00029 #include <QtCore/QSharedDataPointer>
00030 #include <QtCore/QString>
00031 
00032 class QDate;
00033 class QStringList;
00034 
00035 namespace KHolidays {
00036 
00037 class HolidayPrivate;
00038 
00039 class KHOLIDAYS_EXPORT Holiday
00040 {
00041   friend class HolidayRegion;
00042 
00043   public:
00047     typedef QList<Holiday> List;
00048 
00052     enum DayType {
00053       Workday,   
00054       NonWorkday 
00055     };
00056 
00060     Holiday();
00061 
00065     Holiday( const Holiday &other );
00066 
00070     ~Holiday();
00071 
00075     Holiday &operator=( const Holiday &other );
00076 
00080     QString text() const;
00081 
00085     QString shortText() const;
00086 
00090     DayType dayType() const;
00091 
00092   private:
00093     QSharedDataPointer<HolidayPrivate> d;
00094 };
00095 
00096 class KHOLIDAYS_EXPORT HolidayRegion
00097 {
00098   public:
00105     explicit HolidayRegion( const QString &location = QString() );
00106 
00110     ~HolidayRegion();
00111 
00118     static QStringList locations();
00119 
00128     QString location() const;
00129 
00133     Holiday::List holidays( const QDate &date ) const;
00134 
00138     bool isHoliday( const QDate &date ) const;
00139 
00143     bool isValid() const;
00144 
00145   private:
00146     Q_DISABLE_COPY( HolidayRegion )
00147 
00148     class Private;
00149     Private *const d;
00150 };
00151 
00152 }
00153 
00154 #endif

KHolidays Library

Skip menu "KHolidays Library"
  • Main Page
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  • kabc
  • kblog
  • kcal
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  • kldap
  • kmime
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.5.8
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal