• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdepim
  • Sitemap
  • Contact Us
 

ktimetracker

timekard.h

Go to the documentation of this file.
00001 /*
00002  *     Copyright (C) 2003 by Mark Bucciarelli <mark@hubcapconsutling.com>
00003  *                   2007 the ktimetracker developers
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  *      51 Franklin Street, Fifth Floor
00019  *      Boston, MA  02110-1301  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 
00029 #include <QList>
00030 
00031 #include "reportcriteria.h"
00032 
00033 class QString;
00034 class QDate;
00035 
00036 class Task;
00037 class TaskView;
00038 
00046 class Week
00047 {
00048   public:
00050     Week();
00051     Week( const QDate &from );
00052     QDate start() const;
00053     QDate end() const;
00054     QList<QDate> days() const;
00055 
00066     static QList<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:
00091     TimeKard() {}
00092 
00102     QString totalsAsText(TaskView* taskview, ReportCriteria rc);
00103 
00109     QString historyAsText(TaskView* taskview, const QDate& from,
00110         const QDate& to, bool justThisTask, bool perWeek, bool totalsOnly);
00111 
00112 private:
00113     void printTask(Task *t, QString &s, int level, const ReportCriteria &rc);
00114 
00115     void printTaskHistory(const Task *t, const QMap<QString, long>& datamap,
00116                           QMap<QString, long>& daytotals,
00117                           const QDate& from, const QDate& to,
00118                           const int level, QString& retval, bool totalsOnly);
00119 
00120     QString sectionHistoryAsText(TaskView* taskview,
00121                                  const QDate& sectionFrom, const QDate& sectionTo,
00122                                  const QDate& from, const QDate& to,
00123                                  const QString& name,
00124                                  bool justThisTask, bool totalsOnly);
00125 
00126   };
00127 #endif // KARM_TIMEKARD_H

ktimetracker

Skip menu "ktimetracker"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members

kdepim

Skip menu "kdepim"
  • akonadi
  •   clients
  •   kabc
  •   kcal
  •   kcm
  • akregator
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt
  • kdgantt1
  • kjots
  • kleopatra
  • kmail
  • kmobiletools
  • knode
  • knotes
  • kontact
  • kontactinterfaces
  • korganizer
  •   korgac
  • kpilot
  • ktimetracker
  •   doc
  • libkdepim
  • libkholidays
  • libkleo
  • libkpgp
  • maildir
Generated for kdepim by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal