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

KHolidays Library

holidayparserdriver_p.h
00001 /*
00002   This file is part of the kholidays library.
00003 
00004   Copyright 2010 John Layt <john@layt.net>
00005 
00006   This library is free software; you can redistribute it and/or
00007   modify it under the terms of the GNU Library General Public
00008   License as published by the Free Software Foundation; either
00009   version 2 of the License, or (at your option) any later version.
00010 
00011   This library is distributed in the hope that it will be useful,
00012   but WITHOUT ANY WARRANTY; without even the implied warranty of
00013   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014   GNU Library General Public License for more details.
00015 
00016   You should have received a copy of the GNU Library General Public License
00017   along with this library; see the file COPYING.LIB.  If not, write to the
00018   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019   Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
00023 #define KHOLIDAYS_HOLIDAYPARSERDRIVER_P_H
00024 
00025 #include <QDate>
00026 #include <QString>
00027 
00028 #include "holiday.h"
00029 
00030 class KCalendarSystem;
00031 
00032 namespace KHolidays {
00033 
00044 class HolidayParserDriver
00045 {
00046   public:
00047 
00054     explicit HolidayParserDriver( const QString &filePath );
00055 
00059     virtual ~HolidayParserDriver();
00060 
00069     virtual QString fileCountryCode() const;
00070 
00079     virtual QString fileLanguageCode() const;
00080 
00086     virtual QString fileName() const;
00087 
00093     virtual QString fileDescription() const;
00094 
00104     virtual Holiday::List parseHolidays( const QDate &startDate, const QDate &endDate,
00105                                          Holiday::MultidayMode multidayMode );
00106 
00116     virtual Holiday::List parseHolidays( const QDate &date, Holiday::MultidayMode multidayMode );
00117 
00129     virtual Holiday::List parseHolidays( int calendarYear, const QString &calendarType,
00130                                          Holiday::MultidayMode multidayMode );
00131 
00137     virtual void error( const QString &errorMessage );
00138 
00139   protected:
00143     virtual void parse();
00144 
00148     virtual void parseMetadata();
00149 
00155     virtual void setParseCalendar( const QString &calendarType );
00156 
00160     virtual void setParseStartEnd();
00161 
00162     QString          m_filePath;           // File to be parsed
00163 
00164     QString          m_fileCountryCode;    // File country code in ISO 3166-2 standard
00165     QString          m_fileLanguageCode;   // File language
00166     QString          m_fileName;           // File name
00167     QString          m_fileDescription;    // File description
00168 
00169     QDate            m_requestStart;       // First day of period being requested
00170     QDate            m_requestEnd;         // Last day of period being requested
00171 
00172     Holiday::List    m_resultList;         // List of requested holidays
00173 
00174     KCalendarSystem *m_parseCalendar;      // Calendar system being parsed
00175     int              m_parseYear;          // Year currently being parsed
00176     int              m_parseStartYear;     // First year to parse in parse calendar
00177     int              m_parseEndYear;       // Last year to parse in parse calendar
00178 
00179     Holiday::MultidayMode m_multidayMode;   // How to return multiday holidays
00180 };
00181 
00182 }
00183 
00184 #endif // KHOLIDAYS_HOLIDAYPARSERDRIVER_P_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

KDE's Doxygen guidelines are available online.

KHolidays Library

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

kdepimlibs-4.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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