diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-25 05:28:35 +0000 |
commit | f008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch) | |
tree | 8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kplato/kptcontext.cc | |
parent | 1210f27b660efb7b37ff43ec68763e85a403471f (diff) | |
download | koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip |
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kplato/kptcontext.cc')
-rw-r--r-- | kplato/kptcontext.cc | 46 |
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)); } |