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

ktimetracker

  • sources
  • kde-4.12
  • kdepim
  • ktimetracker
timekard.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2003 by Mark Bucciarelli <mark@hubcapconsutling.com>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the
16  * Free Software Foundation, Inc.
17  * 51 Franklin Street, Fifth Floor
18  * Boston, MA 02110-1301 USA.
19  *
20  */
21 
22 #ifndef KTIMETRACKER_TIMEKARD_H
23 #define KTIMETRACKER_TIMEKARD_H
24 
25 #undef Color // X11 headers
26 #undef GrayScale // X11 headers
27 
28 #include <QList>
29 
30 #include "reportcriteria.h"
31 
32 class QString;
33 class QDate;
34 
35 class Task;
36 class TaskView;
37 
45 class Week
46 {
47  public:
49  Week();
50  explicit Week( const QDate &from );
51  QDate start() const;
52  QDate end() const;
53  QList<QDate> days() const;
54 
65  static QList<Week> weeksFromDateRange(const QDate& from,
66  const QDate& to);
67 
74  QString name() const;
75 
76 
77  private:
78  QDate _start;
79 };
80 
84 class TimeKard
85 {
86  public:
90  TimeKard() {}
91 
101  QString totalsAsText(TaskView* taskview, ReportCriteria rc);
102 
108  QString historyAsText(TaskView* taskview, const QDate& from,
109  const QDate& to, bool justThisTask, bool perWeek, bool totalsOnly);
110 
111 private:
112  void printTask(Task *t, QString &s, int level, const ReportCriteria &rc);
113 
114  void printTaskHistory(const Task *t, const QMap<QString, long>& datamap,
115  QMap<QString, long>& daytotals,
116  const QDate& from, const QDate& to,
117  const int level, QString& retval, bool totalsOnly);
118 
119  QString sectionHistoryAsText(TaskView* taskview,
120  const QDate& sectionFrom, const QDate& sectionTo,
121  const QDate& from, const QDate& to,
122  const QString& name,
123  bool justThisTask, bool totalsOnly);
124 
125  };
126 #endif // KTIMETRACKER_TIMEKARD_H
Week::weeksFromDateRange
static QList< Week > weeksFromDateRange(const QDate &from, const QDate &to)
Returns a list of weeks for the given date range.
Definition: timekard.cpp:162
Week::start
QDate start() const
Definition: timekard.cpp:147
TimeKard::totalsAsText
QString totalsAsText(TaskView *taskview, ReportCriteria rc)
Generates ascii text of task totals, for current task on down.
Definition: timekard.cpp:47
TimeKard
Routines to output timecard data.
Definition: timekard.h:84
reportcriteria.h
Week::name
QString name() const
Return the name of the week.
Definition: timekard.cpp:157
TimeKard::TimeKard
TimeKard()
Empty constructor.
Definition: timekard.h:90
ReportCriteria
Stores entries from export dialog.
Definition: reportcriteria.h:41
Week
Seven consecutive days.
Definition: timekard.h:45
name
const char * name
Definition: toolicons.h:159
Week::days
QList< QDate > days() const
TaskView
Container and interface for the tasks.
Definition: taskview.h:50
Task
A class representing a task.
Definition: task.h:54
Week::end
QDate end() const
Definition: timekard.cpp:152
TimeKard::historyAsText
QString historyAsText(TaskView *taskview, const QDate &from, const QDate &to, bool justThisTask, bool perWeek, bool totalsOnly)
Generates ascii text of weekly task history, for current task on down.
Week::Week
Week()
Need an empty constructor to use in a QValueList.
Definition: timekard.cpp:140
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:55:10 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

ktimetracker

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

kdepim API Reference

Skip menu "kdepim API Reference"
  • akonadi_next
  • akregator
  • blogilo
  • calendarsupport
  • console
  •   kabcclient
  •   konsolekalendar
  • kaddressbook
  • kalarm
  •   lib
  • kdgantt2
  • kjots
  • kleopatra
  • kmail
  • knode
  • knotes
  • kontact
  • korgac
  • korganizer
  • ktimetracker
  • libkdepim
  • libkleo
  • libkpgp
  • mailcommon
  • messagelist
  • messageviewer

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