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

KHolidays Library

  • KHolidays
  • HolidayParserDriverPlan
Public Member Functions | Protected Member Functions | List of all members
KHolidays::HolidayParserDriverPlan Class Reference

#include <holidayparserdriverplan_p.h>

Inheritance diagram for KHolidays::HolidayParserDriverPlan:
Inheritance graph
[legend]

Public Member Functions

 HolidayParserDriverPlan (const QString &planFilename)
 
 ~HolidayParserDriverPlan ()
 
void error (const KHolidays::location &errorLocation, const QString &errorMessage)
 
void error (const QString &errorMessage)
 
- Public Member Functions inherited from KHolidays::HolidayParserDriver
 HolidayParserDriver (const QString &filePath)
 
virtual ~HolidayParserDriver ()
 
virtual QString fileCountryCode () const
 
virtual QString fileDescription () const
 
virtual QString fileLanguageCode () const
 
virtual QString fileName () const
 
virtual Holiday::List parseHolidays (const QDate &startDate, const QDate &endDate, Holiday::MultidayMode multidayMode)
 
virtual Holiday::List parseHolidays (const QDate &date, Holiday::MultidayMode multidayMode)
 
virtual Holiday::List parseHolidays (int calendarYear, const QString &calendarType, Holiday::MultidayMode multidayMode)
 

Protected Member Functions

int adjustedMonthNumber (int month)
 
QString filePath ()
 
std::string * fileToParse () const
 
bool isLeapYear (int year)
 
int julianDayFromEaster ()
 
int julianDayFromEventName (const QString &eventName)
 
int julianDayFromMonthDay (int month, int day)
 
int julianDayFromPascha ()
 
int julianDayFromRelativeWeekday (int occurrence, int weekday, int jd)
 
int julianDayFromWeekdayInMonth (int occurrence, int weekday, int month)
 
void parse ()
 
void parseMetadata ()
 
int parseYear ()
 
void setEvent (int event_jd, int observe_offset, int duration)
 
void setEventCalendarType (const QString &calendarType="gregorian")
 
void setEventColorDay (int dayColor)
 
void setEventColorName (int nameColor)
 
void setEventDate (int eventYear, int eventMonth, int eventDay)
 
void setEventDate (int jd)
 
void setEventName (const QString &eventName)
 
void setFileCountryCode (const QString &countryCode)
 
void setFileDescription (const QString &description)
 
void setFileLanguageCode (const QString &languageCode)
 
void setFileName (const QString &ame)
 
void setFromDate (int offset, int condition, int duration)
 
void setFromEaster (int offset, int duration)
 
void setFromPascha (int offset, int duration)
 
void setFromRelativeWeekday (int occurrence, int weekday, int offset, int duration)
 
void setFromWeekdayInMonth (int occurrence, int weekday, int month, int offset, int duration)
 
- Protected Member Functions inherited from KHolidays::HolidayParserDriver
virtual void setParseCalendar (const QString &calendarType)
 
virtual void setParseStartEnd ()
 

Additional Inherited Members

- Protected Attributes inherited from KHolidays::HolidayParserDriver
QString m_fileCountryCode
 
QString m_fileDescription
 
QString m_fileLanguageCode
 
QString m_fileName
 
QString m_filePath
 
Holiday::MultidayMode m_multidayMode
 
KCalendarSystem * m_parseCalendar
 
int m_parseEndYear
 
int m_parseStartYear
 
int m_parseYear
 
QDate m_requestEnd
 
QDate m_requestStart
 
Holiday::List m_resultList
 

Detailed Description

HolidayParserDriverPlan implementation class.

Implements the standard driver interface for parsing Plan holiday files as implemented in KDE SC 4.5 onwards. This includes extensions to the file format to support non-Gregorian calendar systems, metadata, and other new features.

Implemented using Bison/Flex and the Bison C++ skeleton v2.1a, see README. While almost all code is new, the structure of the parser is based on the original Plan parser.

Private, for internal use only

Definition at line 53 of file holidayparserdriverplan_p.h.

Constructor & Destructor Documentation

HolidayParserDriverPlan::HolidayParserDriverPlan ( const QString &  planFilename)

Constructor of Plan file parser driver.

Parameters
filePathfull path to holiday file

Definition at line 52 of file holidayparserdriverplan.cpp.

HolidayParserDriverPlan::~HolidayParserDriverPlan ( )

Destructor.

Definition at line 71 of file holidayparserdriverplan.cpp.

Member Function Documentation

void HolidayParserDriverPlan::error ( const KHolidays::location &  errorLocation,
const QString &  errorMessage 
)

Bison C++ skeleton error message handling.

Parameters
errorMessageerror message to log

Definition at line 79 of file holidayparserdriverplan.cpp.

void HolidayParserDriverPlan::error ( const QString &  errorMessage)
virtual

Standard error message handling.

Parameters
errorMessageerror message to log

Reimplemented from KHolidays::HolidayParserDriver.

Definition at line 87 of file holidayparserdriverplan.cpp.

void HolidayParserDriverPlan::parse ( )
protectedvirtual

Actually parse the file, new plan format implementation.

Reimplemented from KHolidays::HolidayParserDriver.

Definition at line 93 of file holidayparserdriverplan.cpp.

void HolidayParserDriverPlan::parseMetadata ( )
protectedvirtual

Parse the file for metadata only and populate the metadata variables.

Reimplemented from KHolidays::HolidayParserDriver.

Definition at line 119 of file holidayparserdriverplan.cpp.


The documentation for this class was generated from the following files:
  • holidayparserdriverplan_p.h
  • holidayparserdriverplan.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 23:00:06 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
  • kldap
  • kmbox
  • kmime
  • kpimidentities
  • kpimtextedit
  • kresources
  • ktnef
  • kxmlrpcclient
  • microblog

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