kplato

KPlato::CalendarWeekdays Class Reference

List of all members.

Detailed Description

Definition at line 112 of file kptcalendar.h.


Public Member Functions

 CalendarWeekdays ()
 CalendarWeekdays (CalendarWeekdays *weekdays)
 ~CalendarWeekdays ()
bool load (QDomElement &element)
void save (QDomElement &element) const
void addWeekday (CalendarDay *day)
const QPtrList< CalendarDay > & weekdays () const
CalendarDayweekday (int day) const
CalendarDayweekday (const QDate &date) const
CalendarDayreplace (int weekday, CalendarDay *day)
IntMap map ()
void setWeekday (IntMap::iterator it, int state)
int state (const QDate &date) const
int state (int weekday) const
void setState (int weekday, int state)
const QPtrList< QPair< QTime,
QTime > > & 
intervals (int weekday) const
void setIntervals (int weekday, QPtrList< QPair< QTime, QTime > >intervals)
void clearIntervals (int weekday)
bool operator== (const CalendarWeekdays *weekdays) const
bool operator!= (const CalendarWeekdays *weekdays) const
Duration effort (const QDate &date, const QTime &start, const QTime &end)
QPair< QTime, QTime > interval (const QDate date, const QTime &start, const QTime &end) const
bool hasInterval (const QDate date, const QTime &start, const QTime &end) const
bool hasInterval () const
Duration duration () const
Duration duration (int weekday) const
QTime startOfDay (int weekday) const
QTime endOfDay (int weekday) const
const CalendarWeekdayscopy (const CalendarWeekdays &weekdays)
void printDebug (QCString indent="")

Member Function Documentation

CalendarDay * KPlato::CalendarWeekdays::weekday ( int  day  )  const

Returns the pointer to CalendarDay for day or 0 if not defined.

day is 0..6.

Parameters:
day todo : add a comment

Definition at line 460 of file kptcalendar.cc.

QPair< QTime, QTime > KPlato::CalendarWeekdays::interval ( const QDate  date,
const QTime &  start,
const QTime &  end 
) const

Returns the actual 'work interval' on the weekday defined by date for the interval start to end.

If no 'work interval' exists, returns the interval start, end. Use hasInterval() to check if a 'work interval' exists.

Definition at line 433 of file kptcalendar.cc.

bool KPlato::CalendarWeekdays::hasInterval ( const QDate  date,
const QTime &  start,
const QTime &  end 
) const

Returns true if at least a part of a 'work interval' exists on the weekday defined by date for the interval start to end.

Definition at line 444 of file kptcalendar.cc.

QTime KPlato::CalendarWeekdays::startOfDay ( int  weekday  )  const

Returns the time when the weekday starts.

Definition at line 485 of file kptcalendar.cc.

QTime KPlato::CalendarWeekdays::endOfDay ( int  weekday  )  const

Returns the time when the weekday ends.

Definition at line 492 of file kptcalendar.cc.


The documentation for this class was generated from the following files:
KDE Home | KDE Accessibility Home | Description of Access Keys