karm Library API Documentation

Week Class Reference

Seven consecutive days. More...

#include <timekard.h>

List of all members.

Public Methods

 Week ()
 Week (QDate from)
QDate start () const
QDate end () const
QValueList< QDatedays () const
QString name () const

Static Public Methods

QValueList< Week > weeksFromDateRange (const QDate &from, const QDate &to)


Detailed Description

Seven consecutive days.

The timecard report prints out one table for each week of data. The first day of the week should be read from the KControlPanel. Currently, it is hardcoded to Sunday.

Definition at line 46 of file timekard.h.


Constructor & Destructor Documentation

Week::Week  
 

Need an empty constructor to use in a QValueList.

Definition at line 313 of file timekard.cpp.

Referenced by weeksFromDateRange().


Member Function Documentation

QValueList< Week > Week::weeksFromDateRange const QDate   from,
const QDate   to
[static]
 

Returns a list of weeks for the given date range.

The first day of the week is picked up from the settings in the KontrolPanel.

The list is inclusive; for example, if you pass in a date range of two days, one being a Sunday and the other being a Monday, you will get two weeks back in the list.

Definition at line 336 of file timekard.cpp.

References QDate::addDays(), QValueList::append(), QDate::dayOfWeek(), and Week().

Referenced by TimeKard::historyAsText().

QString Week::name   const
 

Return the name of the week.

Uses whatever the user has set up for the long date format in KControlPanel, prefixed by "Week of".

Definition at line 330 of file timekard.cpp.

References QString::arg().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for karm Library Version 3.2.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Sat May 1 11:37:53 2004 by doxygen 1.2.15 written by Dimitri van Heesch, © 1997-2003