2 * ExportReport.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.
12 #ifndef _ExportReport_h_
13 #define _ExportReport_h_
16 #include <TaskDependency.h>
19 class CustomAttributeDefinition;
23 class ExportReport : public Report
26 ExportReport(Project* p, const QString& f, const QString& df, int dl);
27 virtual ~ExportReport() { }
29 virtual const char* getType() const { return "ExportReport"; }
33 bool addTaskAttribute(const QString& ta);
34 QStringList getTaskAttributes() const { return taskAttributes; }
36 void setMasterFile(bool mf) { masterFile = mf; }
38 void resetContentFlags();
39 void setListShifts(bool ls) { listShifts = ls; }
40 void setListResources(bool lr) { listResources = lr; }
41 void setListTasks(bool lt) { listTasks = lt; }
42 void setListBookings(bool lb) { listBookings = lb; }
45 bool generateProjectProperty();
46 bool generateCustomAttributeDeclaration(const QString& propertyName,
47 QDictIterator<CustomAttributeDefinition> it);
48 bool generateScenario(const Scenario* scenario, int indent);
49 bool generateShiftList();
50 bool generateShift(const Shift*, int indent);
51 void generateResourceVacations(const Resource* resource, int indent);
52 void generateVacations();
53 bool generateWorkingHours(const QPtrList<Interval>* const* wh,
54 const QPtrList<Interval>* const* ref,
56 bool generateProjectIds(const TaskList& tasks);
57 bool generateResourceList(ResourceList& frl, TaskList& ftl);
58 bool generateResource(ResourceList& frl, const Resource* r, int ident);
59 bool generateTaskList(TaskList& ftl, ResourceList& frl);
60 bool generateTask(TaskList& ftl, const Task* task, int indent);
61 bool generateTaskAttributeList(TaskList& ftl);
62 bool generateTaskSupplement(TaskList& ftl, const Task* task, int indent);
63 bool generateDepList(TaskList& filteredTaskList, const Task* task,
64 QPtrListIterator<TaskDependency> depIt, bool prev,
66 bool generateResourceAttributesList(TaskList& ftl, ResourceList& frl);
67 bool generateCustomAttributeValue(const QString& id,
68 const CoreAttributes* property,
71 QStringList taskAttributes;
73 // True if the file should be a standalone project (*.tjp file).