• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdepimlibs API Reference
  • KDE Home
  • Contact Us
 

KHolidays Library

  • sources
  • kde-4.14
  • kdepimlibs
  • kholidays
holiday.h
1 /*
2  This file is part of the kholidays library.
3 
4  Copyright (c) 2001 Cornelius Schumacher <schumacher@kde.org>
5  Copyright (c) 2004 Allen Winter <winter@kde.org>
6  Copyright (c) 2008 David Jarvie <djarvie@kde.org>
7  Copyright 2010 John Layt <john@layt.net>
8 
9  This library is free software; you can redistribute it and/or
10  modify it under the terms of the GNU Library General Public
11  License as published by the Free Software Foundation; either
12  version 2 of the License, or (at your option) any later version.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  GNU Library General Public License for more details.
18 
19  You should have received a copy of the GNU Library General Public License
20  along with this library; see the file COPYING.LIB. If not, write to the
21  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
22  Boston, MA 02110-1301, USA.
23 */
24 
25 #ifndef KHOLIDAYS_HOLIDAY_H
26 #define KHOLIDAYS_HOLIDAY_H
27 
28 #include "kholidays_export.h"
29 
30 #include <QtCore/QList>
31 #include <QtCore/QSharedDataPointer>
32 
33 class QDate;
34 class QString;
35 
36 namespace KHolidays {
37 
38 class HolidayPrivate;
39 class HolidayRegion;
40 
41 class KHOLIDAYS_EXPORT Holiday
42 {
43  friend class HolidayRegion;
44  friend class HolidayParserDriverPlan;
45  friend class HolidayParserDriverPlanOld;
46 
47  public:
51  typedef QList<Holiday> List;
52 
56  enum DayType {
57  Workday,
58  NonWorkday
59  };
60 
64  enum MultidayMode {
65  MultidayHolidaysAsMultipleEvents,
66  MultidayHolidaysAsSingleEvents
67  };
68 
72  Holiday();
73 
77  Holiday( const Holiday &other );
78 
82  ~Holiday();
83 
87  Holiday &operator=( const Holiday &other );
88 
92  bool operator<( const Holiday &rhs ) const;
93 
97  bool operator>( const Holiday &rhs ) const;
98 
102  QDate date() const;
103 
109  QDate observedStartDate() const;
110 
116  QDate observedEndDate() const;
117 
123  int duration() const;
124 
128  QString text() const;
129 
133  QString shortText() const;
134 
138  DayType dayType() const;
139 
140  private:
141  QSharedDataPointer<HolidayPrivate> d;
142 };
143 
144 }
145 
146 #endif // KHOLIDAYS_HOLIDAY_H
QDate
QString
QList< Holiday >
QSharedDataPointer< HolidayPrivate >
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:37:00 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KHolidays Library

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

kdepimlibs API Reference

Skip menu "kdepimlibs API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal