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

KHolidays Library

  • kholidays
holidayregion.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_HOLIDAYREGION_H
26#define KHOLIDAYS_HOLIDAYREGION_H
27
28#include "kholidays_export.h"
29
30#include <QtCore/QList>
31#include <QtCore/QSharedDataPointer>
32#include <QtCore/QString>
33
34#include "holiday.h"
35
36class QDate;
37class QStringList;
38class QFileInfo;
39
40namespace KHolidays {
41
42class KHOLIDAYS_EXPORT HolidayRegion
43{
44 public:
55 explicit HolidayRegion( const QString &regionCode = QString() );
56
63 explicit HolidayRegion( const QFileInfo &regionFile );
64
68 ~HolidayRegion();
69
80 static QStringList locations();
81
95 QString location() const;
96
108 static QStringList regionCodes();
109
122 static QString defaultRegionCode( const QString &country = QString(),
123 const QString &language = QString() );
124
135 QString regionCode() const;
136
149 QString countryCode() const;
150
164 static QString countryCode( const QString &regionCode );
165
176 QString languageCode() const;
177
189 static QString languageCode( const QString &regionCode );
190
199 QString name() const;
200
209 static QString name( const QString &regionCode );
210
218 QString description() const;
219
227 static QString description( const QString &regionCode );
228
234 Holiday::List holidays( const QDate &startDate, const QDate &endDate ) const;
235
236 //KDE5: merge with default multidayMode
242 Holiday::List holidays( const QDate &startDate, const QDate &endDate,
243 Holiday::MultidayMode multidayMode ) const;
244
248 Holiday::List holidays( const QDate &date ) const;
249
250 //KDE5: merge with default multidayMode
256 Holiday::List holidays( const QDate &date, Holiday::MultidayMode multidayMode ) const;
257
263 Holiday::List holidays( int calendarYear, const QString &calendarType ) const;
264
265 //KDE5: merge with default multidayMode
271 Holiday::List holidays( int calendarYear, const QString &calendarType,
272 Holiday::MultidayMode multidayMode ) const;
273
277 bool isHoliday( const QDate &date ) const;
278
282 bool isValid() const;
283
289 static bool isValid( const QString &regionCode );
290
291 private:
292 Q_DISABLE_COPY( HolidayRegion )
293
294 class Private;
295 Private *const d;
296};
297
298}
299
300#endif // KHOLIDAYS_HOLIDAYREGION_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Thu Jul 21 2022 00:00:00 by doxygen 1.9.5 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-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 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
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