26#include "plannerparser.h"
35 kdDebug() << "entering constructor to import planner tasks" << endl;
38 if (_taskView->current_item()) if (_taskView->current_item()->parent())
40 task = _taskView->current_item()->parent();
53 kdDebug() << "entering startElement" << endl;
58 if (qName == TQString::fromLatin1( "tasks")) withInTasks= true;
59 if ((qName == TQString::fromLatin1( "task")) && (withInTasks))
63 for ( int i=0; i<att.length(); i++)
65 if (att.qName(i) == TQString::fromLatin1( "name")) taskName=att.value(i);
66 if (att.qName(i)==TQString::fromLatin1( "percent-complete")) taskComplete=att.value(i).toInt();
75 task = new Task(taskName, 0, 0, dl, parentTask);
76 task->setUid(_taskView->storage()->addTask(task, parentTask));
80 task = new Task(taskName, 0, 0, dl, _taskView);
81 kdDebug() << "added" << taskName << endl;
82 task->setUid(_taskView->storage()->addTask(task, 0));
85 task->setPercentComplete(taskComplete, _taskView->storage());
95 if (qName== "task") if (level-->=0) task=task->parent();
96 if (qName== "tasks") withInTasks= false;
PlannerParser(TaskView *tv) Stores the active TaskView in this parser.
bool endElement(const TQString &, const TQString &, const TQString &qName) given by the framework from qxml.
bool startElement(const TQString &, const TQString &, const TQString &qName, const TQXmlAttributes &att) given by the framework from qxml.
bool startDocument() given by the framework from qxml.
Container and interface for the tasks.
A class representing a task.
|