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

KHolidays Library

  • kholidays
  • parsers
holidayparserdriver_p.h
1 /*
2  This file is part of the kholidays library.
3 
4  Copyright 2010 John Layt <john@layt.net>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public License
17  along with this library; see the file COPYING.LIB. If not, write to the
18  Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
23 #define KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
24 
25 #include <QDate>
26 #include <QString>
27 
28 #include "holiday.h"
29 
30 class KCalendarSystem;
31 
32 namespace KHolidays {
33 
44 class HolidayParserDriver
45 {
46  public:
47 
54  explicit HolidayParserDriver( const QString &filePath );
55 
59  virtual ~HolidayParserDriver();
60 
69  virtual QString fileCountryCode() const;
70 
79  virtual QString fileLanguageCode() const;
80 
86  virtual QString fileName() const;
87 
93  virtual QString fileDescription() const;
94 
104  virtual Holiday::List parseHolidays( const QDate &startDate, const QDate &endDate,
105  Holiday::MultidayMode multidayMode );
106 
116  virtual Holiday::List parseHolidays( const QDate &date, Holiday::MultidayMode multidayMode );
117 
129  virtual Holiday::List parseHolidays( int calendarYear, const QString &calendarType,
130  Holiday::MultidayMode multidayMode );
131 
137  virtual void error( const QString &errorMessage );
138 
139  protected:
143  virtual void parse();
144 
148  virtual void parseMetadata();
149 
155  virtual void setParseCalendar( const QString &calendarType );
156 
160  virtual void setParseStartEnd();
161 
162  QString m_filePath; // File to be parsed
163 
164  QString m_fileCountryCode; // File country code in ISO 3166-2 standard
165  QString m_fileLanguageCode; // File language
166  QString m_fileName; // File name
167  QString m_fileDescription; // File description
168 
169  QDate m_requestStart; // First day of period being requested
170  QDate m_requestEnd; // Last day of period being requested
171 
172  Holiday::List m_resultList; // List of requested holidays
173 
174  KCalendarSystem *m_parseCalendar; // Calendar system being parsed
175  int m_parseYear; // Year currently being parsed
176  int m_parseStartYear; // First year to parse in parse calendar
177  int m_parseEndYear; // Last year to parse in parse calendar
178 
179  Holiday::MultidayMode m_multidayMode; // How to return multiday holidays
180 };
181 
182 }
183 
184 #endif // KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sat Jul 13 2013 01:25:09 by doxygen 1.8.3.1 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.10.5 API Reference

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