2 * ReportHtml.h - TaskJuggler
4 * Copyright (c) 2001, 2002 by Chris Schlaeger <cs@suse.de>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of version 2 of the GNU General Public License as
8 * published by the Free Software Foundation.
13 #ifndef _Report_Html_h_
14 #define _Report_Html_h_
20 #include <qstringlist.h>
22 #include <qtextstream.h>
26 #include "MacroTable.h"
27 #include "taskjuggler.h"
33 * @short Stores all information about an HTML report.
34 * @author Chris Schlaeger <cs@suse.de>
36 class ReportHtml : public Report
39 ReportHtml(Project* p, const QString& f, time_t s, time_t e,
40 const QString& df, int dl);
41 virtual ~ReportHtml() { }
43 enum BarLabelText { BLT_EMPTY = 0, BLT_LOAD };
45 void generatePlanTask(Task* t, Resource* r, uint no);
46 void generateActualTask(Task* t, Resource* r);
48 void generatePlanResource(Resource* r, Task* t, uint no);
49 void generateActualResource(Resource* r, Task* t);
51 void reportHTMLHeader();
52 void reportHTMLFooter();
54 bool generateTableHeader();
56 void generateDepends(Task* t, bool light);
57 void generateFollows(Task* t, bool light);
58 void generateResponsibilities(Resource* r, bool light);
59 void htmlDailyHeaderDays(bool highlightNow = TRUE);
60 void htmlDailyHeaderMonths();
61 void htmlWeeklyHeaderWeeks(bool highlightNow = TRUE);
62 void htmlWeeklyHeaderMonths();
63 void htmlMonthlyHeaderMonths(bool highlightNow = TRUE);
64 void htmlMonthlyHeaderYears();
66 void emptyPlan(bool light);
67 void emptyActual(bool light);
69 void textOneRow(const QString& text, bool light, const QString& align);
70 void textTwoRows(const QString& text, bool light, const QString& align);
72 void dailyResourcePlan(Resource* r, Task* t);
73 void dailyResourceActual(Resource* r, Task* t);
74 void dailyTaskPlan(Task* t, Resource* r);
75 void dailyTaskActual(Task* t, Resource* r);
77 void weeklyResourcePlan(Resource* r, Task* t);
78 void weeklyResourceActual(Resource* r, Task* t);
79 void weeklyTaskPlan(Task* t, Resource* r);
80 void weeklyTaskActual(Task* t, Resource* r);
82 void monthlyResourcePlan(Resource* r, Task* t);
83 void monthlyResourceActual(Resource* r, Task* t);
84 void monthlyTaskPlan(Task* t, Resource* r);
85 void monthlyTaskActual(Task* t, Resource* r);
87 void taskName(Task* t, Resource* r, bool big);
88 void resourceName(Resource* t, Task* t, bool big);
90 void planResources(Task* t, bool light);
91 void actualResources(Task* t, bool light);
93 void reportLoad(double load, const QString& bgcol, bool bold);
94 void reportPIDs(const QString& pids, const QString bgCol, bool bold);
96 void generateSchedule(int sc, Resource* r, Task* t);
98 void flagList(CoreAttributes* c1, CoreAttributes* c2);
100 void generateTaskStatus(TaskStatus status, bool light);
102 void setBarLabels(BarLabelText blt) { barLabels = blt; }
104 void registerUrl(const QString& key, const QString& url = QString::null)
108 bool setUrl(const QString& key, const QString& url);
109 const QString* getUrl(const QString& key) const;
111 void setRawHead(const QString& head)
116 void setRawTail(const QString& tail)
121 void setRawStyleSheet(const QString& styleSheet)
123 rawStyleSheet = styleSheet;
129 QString htmlFilter(const QString& s);
130 QString generateUrl(const QString& key, const QString& txt);
135 uint colDefaultLight;
144 uint colCompletedLight;
147 BarLabelText barLabels;
151 QString rawStyleSheet;
153 QMap<QString, QString> urls;