karm Library API Documentation

timekard.h

00001 /*
00002  *   This file only: 
00003  *     Copyright (C) 2003  Mark Bucciarelli <mark@hubcapconsutling.com>
00004  *
00005  *   This program is free software; you can redistribute it and/or modify
00006  *   it under the terms of the GNU General Public License as published by
00007  *   the Free Software Foundation; either version 2 of the License, or
00008  *   (at your option) any later version.
00009  *
00010  *   This program is distributed in the hope that it will be useful,
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013  *   GNU General Public License for more details.
00014  *
00015  *   You should have received a copy of the GNU General Public License along
00016  *   with this program; if not, write to the 
00017  *      Free Software Foundation, Inc.
00018  *      59 Temple Place - Suite 330 
00019  *      Boston, MA  02111-1307  USA.
00020  *
00021  */
00022 
00023 #ifndef KARM_TIMEKARD_H
00024 #define KARM_TIMEKARD_H
00025 
00026 #undef Color // X11 headers
00027 #undef GrayScale // X11 headers
00028 #include <kprinter.h>
00029 //#include <qdate.h>
00030 
00031 #include "karmstorage.h"
00032 
00033 class QString;
00034 class QDate;
00035 
00036 class TaskView;
00037 
00038 
00046 class Week
00047 {
00048   public:
00050     Week();
00051     Week(QDate from);
00052     QDate start() const;
00053     QDate end() const;
00054     QValueList<QDate> days() const;
00055 
00066     static QValueList<Week> weeksFromDateRange(const QDate& from, 
00067         const QDate& to);
00068 
00075     QString name() const;
00076 
00077 
00078   private:
00079     QDate _start;
00080 };
00081 
00085 class TimeKard
00086 {
00087   public:
00088     TimeKard() {};
00089 
00100     QString totalsAsText(TaskView* taskview, bool justThisTask = true);
00101 
00107     QString historyAsText(TaskView* taskview, const QDate& from, 
00108         const QDate& to, bool justThisTask = true);
00109 
00110     void printTask(Task *t, QString &s, int level);
00111 
00112     void printWeekTask(const Task *t, const QMap<QString, long>& datamap, 
00113         QMap<QString, long>& daytotals, 
00114         const Week& week, const int level, QString& retval);
00115   
00116 };
00117 #endif // KARM_TIMEKARD_H
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