summaryrefslogtreecommitdiffstats
path: root/kplato/kptcontext.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kplato/kptcontext.cc')
-rw-r--r--kplato/kptcontext.cc46
1 files changed, 23 insertions, 23 deletions
diff --git a/kplato/kptcontext.cc b/kplato/kptcontext.cc
index bdcd7e79..830c6c95 100644
--- a/kplato/kptcontext.cc
+++ b/kplato/kptcontext.cc
@@ -19,7 +19,7 @@
#include "kptcontext.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
@@ -34,7 +34,7 @@ Context::Context()
Context::~Context() {
}
-bool Context::load(QDomElement &element) {
+bool Context::load(TQDomElement &element) {
currentView = element.attribute("current-view");
currentEstimateType = element.attribute("estimate-type").toInt();
currentSchedule = element.attribute("current-schedule").toLong();
@@ -42,10 +42,10 @@ bool Context::load(QDomElement &element) {
actionViewOptimistic = element.attribute("view-optimistic").toInt();
actionViewPessimistic = element.attribute("view-pessimistic").toInt();
- QDomNodeList list = element.childNodes();
+ TQDomNodeList list = element.childNodes();
for (unsigned int i=0; i<list.count(); ++i) {
if (list.item(i).isElement()) {
- QDomElement e = list.item(i).toElement();
+ TQDomElement e = list.item(i).toElement();
if (e.tagName() == "gantt-view") {
ganttview.ganttviewsize = e.attribute("ganttview-size").toInt();
ganttview.taskviewsize = e.attribute("taskview-size").toInt();
@@ -59,15 +59,15 @@ bool Context::load(QDomElement &element) {
ganttview.showCriticalPath = e.attribute("show-criticalpath").toInt();
ganttview.showNoInformation = e.attribute("show-noinformation").toInt();
- QDomNodeList list = e.childNodes();
+ TQDomNodeList list = e.childNodes();
for (unsigned int i=0; i<list.count(); ++i) {
if (list.item(i).isElement()) {
- QDomElement g = list.item(i).toElement();
+ TQDomElement g = list.item(i).toElement();
if (g.tagName() == "closed-nodes") {
- QDomNodeList list = g.childNodes();
+ TQDomNodeList list = g.childNodes();
for (unsigned int i=0; i<list.count(); ++i) {
if (list.item(i).isElement()) {
- QDomElement ei = list.item(i).toElement();
+ TQDomElement ei = list.item(i).toElement();
if (ei.tagName() == "node") {
ganttview.closedNodes.append(ei.attribute("id"));
}
@@ -79,19 +79,19 @@ bool Context::load(QDomElement &element) {
} else if (e.tagName() == "accounts-view") {
accountsview.accountsviewsize = e.attribute("accountsview-size").toInt();
accountsview.periodviewsize = e.attribute("periodview-size").toInt();
- accountsview.date = QDate::fromString(e.attribute("date"), Qt::ISODate);
+ accountsview.date = TQDate::fromString(e.attribute("date"), Qt::ISODate);
accountsview.period = e.attribute("period").toInt();
accountsview.cumulative = e.attribute("cumulative").toInt();
- QDomNodeList list = e.childNodes();
+ TQDomNodeList list = e.childNodes();
for (unsigned int i=0; i<list.count(); ++i) {
if (list.item(i).isElement()) {
- QDomElement g = list.item(i).toElement();
+ TQDomElement g = list.item(i).toElement();
if (g.tagName() == "closed-items") {
- QDomNodeList list = g.childNodes();
+ TQDomNodeList list = g.childNodes();
for (unsigned int i=0; i<list.count(); ++i) {
if (list.item(i).isElement()) {
- QDomElement ei = list.item(i).toElement();
+ TQDomElement ei = list.item(i).toElement();
if (ei.tagName() == "account") {
accountsview.closedItems.append(ei.attribute("name"));
}
@@ -109,8 +109,8 @@ bool Context::load(QDomElement &element) {
return true;
}
-void Context::save(QDomElement &element) const {
- QDomElement me = element.ownerDocument().createElement("context");
+void Context::save(TQDomElement &element) const {
+ TQDomElement me = element.ownerDocument().createElement("context");
element.appendChild(me);
me.setAttribute("current-view", currentView);
me.setAttribute("estimate-type", currentEstimateType);
@@ -119,7 +119,7 @@ void Context::save(QDomElement &element) const {
me.setAttribute("view-optimistic", actionViewOptimistic);
me.setAttribute("view-pessimistic", actionViewPessimistic);
// Ganttview
- QDomElement g = me.ownerDocument().createElement("gantt-view");
+ TQDomElement g = me.ownerDocument().createElement("gantt-view");
me.appendChild(g);
g.setAttribute("ganttview-size", ganttview.ganttviewsize);
g.setAttribute("taskview-size", ganttview.taskviewsize);
@@ -133,16 +133,16 @@ void Context::save(QDomElement &element) const {
g.setAttribute("show-criticalpath", ganttview.showCriticalPath);
g.setAttribute("show-noinformation", ganttview.showNoInformation);
if (!ganttview.closedNodes.isEmpty()) {
- QDomElement e = g.ownerDocument().createElement("closed-nodes");
+ TQDomElement e = g.ownerDocument().createElement("closed-nodes");
g.appendChild(e);
- for (QStringList::ConstIterator it = ganttview.closedNodes.begin(); it != ganttview.closedNodes.end(); ++it) {
- QDomElement c = e.ownerDocument().createElement("node");
+ for (TQStringList::ConstIterator it = ganttview.closedNodes.begin(); it != ganttview.closedNodes.end(); ++it) {
+ TQDomElement c = e.ownerDocument().createElement("node");
e.appendChild(c);
c.setAttribute("id", (*it));
}
}
// Accountsview
- QDomElement a = me.ownerDocument().createElement("accounts-view");
+ TQDomElement a = me.ownerDocument().createElement("accounts-view");
me.appendChild(a);
a.setAttribute("accountsview-size", accountsview.accountsviewsize);
a.setAttribute("periodview-size", accountsview.periodviewsize);
@@ -150,10 +150,10 @@ void Context::save(QDomElement &element) const {
a.setAttribute("period", accountsview.period);
a.setAttribute("cumulative", accountsview.cumulative);
if (!accountsview.closedItems.isEmpty()) {
- QDomElement e = a.ownerDocument().createElement("closed-items");
+ TQDomElement e = a.ownerDocument().createElement("closed-items");
a.appendChild(e);
- for (QStringList::ConstIterator it = accountsview.closedItems.begin(); it != accountsview.closedItems.end(); ++it) {
- QDomElement c = e.ownerDocument().createElement("account");
+ for (TQStringList::ConstIterator it = accountsview.closedItems.begin(); it != accountsview.closedItems.end(); ++it) {
+ TQDomElement c = e.ownerDocument().createElement("account");
e.appendChild(c);
c.setAttribute("name", (*it));
}