OSDN Git Service

Added Weekstart property to xml output
authorfreitag <freitag@e1914e07-63f8-0310-9059-d6d858d7cdca>
Mon, 9 Dec 2002 15:57:27 +0000 (15:57 +0000)
committerfreitag <freitag@e1914e07-63f8-0310-9059-d6d858d7cdca>
Mon, 9 Dec 2002 15:57:27 +0000 (15:57 +0000)
git-svn-id: https://www.taskjuggler.org/svn/taskjuggler/trunk@363 e1914e07-63f8-0310-9059-d6d858d7cdca

taskjuggler/Project.cpp
taskjuggler/ReportXML.cpp

index 545d2f5..98c2e30 100644 (file)
@@ -545,6 +545,14 @@ void Project::parseDomElem( QDomElement& parentElem )
       {
         setName( elem.text() );
       }
+      else if( tagName == "Project" )
+      {
+        QString prjId = elem.attribute("Id");
+        addId( prjId );  // FIXME ! There can be more than one project ids!
+
+        prjId = elem.attribute("WeekStart");
+        setWeekStartsMonday( prjId == "Mon" );
+      }
       else if( tagName == "Version" )
         setVersion( elem.text() );
       else if( tagName == "Priority" )
index 6a33ae0..cdc137b 100644 (file)
@@ -16,7 +16,8 @@
  <!-- The head of all: Project -->
  <!ELEMENT Project      (Name, Version, Priority, start, end, now, Task+)>
  <!ATTLIST Project
-          Id           CDATA #REQUIRED>
+          Id           CDATA #REQUIRED
+          WeekStart    CDATA #IMPLIED>
  <!ELEMENT Name         (#PCDATA)>
  <!ELEMENT Version      (#PCDATA)>
  <!ELEMENT Priority     (#PCDATA)>
@@ -73,7 +74,8 @@ void ReportXML::generate()
    QDomElement proj = doc.createElement( "Project" );
    // FIXME: All projectIDs need to be saved here.
    proj.setAttribute( "Id", project->getCurrentId());
-
+   proj.setAttribute( "WeekStart", project->getWeekStartsMonday() ? "Mon" : "Sun" );
+   
    proj.appendChild( ReportXML::createXMLElem( doc, "Name", project->getName()));
    QString hStr = project->getVersion();
    if( !hStr.isEmpty() )