2 * XMLReport.h - TaskJuggler
4 * Copyright (c) 2002 by Chris Schlaeger <cs@kde.org>
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.
20 class CustomAttributeDefinition;
27 class XMLReport : public Report
30 XMLReport(Project* p, const QString& f, const QString& df, int dl);
33 virtual const char* getType() const { return "XMLReport"; }
37 bool addAccountAttribute(const QString& aa);
38 QStringList getAccountAttributes() const { return accountAttributes; }
40 bool addTaskAttribute(const QString& ta);
41 QStringList getTaskAttributes() const { return taskAttributes; }
44 bool generateProjectProperty(QDomElement* n);
45 bool generateCustomAttributeDeclaration(QDomElement* parentEl,
46 const QString& propertyName,
47 QDictIterator<CustomAttributeDefinition> it);
48 bool generateScenario(QDomElement* parentEl, Scenario* scenario);
50 bool generateGlobalVacationList(QDomElement* parentNode);
51 bool generateShiftList(QDomElement* parentNode);
52 bool generateShift(QDomElement* parentEl, const Shift*);
53 bool generateWorkingHours(QDomElement* el,
54 const QPtrList<Interval>* const* wh);
55 bool generateResourceList(QDomElement* parentNode, ResourceList& frl,
57 bool generateResource(QDomElement* parentEl, ResourceList& frl,
58 TaskList& ftl, const Resource* r);
59 bool generateAccountList(QDomElement* parentNode, AccountList& fal,
61 bool generateAccount(QDomElement* parentEl, AccountList& fal,
62 TaskList& ftl, const Account* a);
63 bool generateTaskList(QDomElement* parentNode, TaskList& ftl,
65 bool generateTask(QDomElement* parentEl, TaskList& ftl, const Task* task);
66 bool generateDepList(QDomElement* el, TaskList& filteredTaskList,
68 QPtrListIterator<TaskDependency> dl, bool prev);
69 bool generateCustomAttributeValue(QDomElement* parentEl,
71 const CoreAttributes* property);
72 bool generateAllocate(QDomElement* el, const Task* t);
74 bool generateBookingList(QDomElement* parentEl, TaskList& ftl,
76 void genTextAttr(QDomElement* el, const QString& name, const QString& text);
77 void genDoubleAttr(QDomElement* el, const QString& name, double val);
78 void genLongAttr(QDomElement* el, const QString& name, long val);
80 void genTextElement(QDomElement* parentEl, const QString& name,
82 void genDateElement(QDomElement* el, const QString& name, time_t val);
83 void genTimeElement(QDomElement* el, const QString& name, time_t val);
87 QStringList accountAttributes;
88 QStringList taskAttributes;