OSDN Git Service

adjust integer's signedness
[tjqt4port/tj2qt4.git] / taskjuggler / SVGReport.cpp
1 /*
2  * SVGReport.cpp - TaskJuggler
3  *
4  * Copyright (c) 2001, 2002, 2003, 2004 by Chris Schlaeger <cs@kde.org>
5  *
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.
9  *
10  * $Id$
11  */
12
13 #include <config.h>
14
15 #ifdef HAVE_KDE
16
17 #include "SVGReport.h"
18
19 // #include <qptrdict.h>
20 // #include <qfile.h>
21 // #include <klocale.h>
22
23 #include "tjlib-internal.h"
24 #include "Project.h"
25 #include "Scenario.h"
26
27 // Older versions of KDE do not have this macro
28 #ifndef KDE_IS_VERSION
29 #define KDE_IS_VERSION(a,b,c) 0
30 #endif
31
32 SVGReport::SVGReport(Project* p, const QString& file, const QString& defFile,
33                        int dl) :
34     Report(p, file, defFile, dl)
35 {
36     // By default, use all scenarios.
37     unsigned int i = 0;
38     for (ScenarioListIterator sli(project->getScenarioIterator()); *sli ; ++sli, ++i)
39     {
40         if ((*sli)->getEnabled())
41             scenarios.append(i);
42     }
43
44     taskSortCriteria[0] = CoreAttributesList::NameUp;
45 }
46
47 void SVGReport::inheritValues()
48 {
49     Report::inheritValues();
50
51     SVGReport* parent = dynamic_cast<SVGReport*>(getParentReport());
52
53     if (parent)
54     {
55         setCaption(parent->getCaption());
56     }
57 }
58
59 #endif