diff options
Diffstat (limited to 'quanta/parsers/node.cpp')
-rw-r--r-- | quanta/parsers/node.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/quanta/parsers/node.cpp b/quanta/parsers/node.cpp index 0831a67c..219716e9 100644 --- a/quanta/parsers/node.cpp +++ b/quanta/parsers/node.cpp @@ -15,8 +15,8 @@ * * ***************************************************************************/ //qt includes -#include <qlistview.h> -#include <qdom.h> +#include <tqlistview.h> +#include <tqdom.h> #include <kdebug.h> @@ -27,7 +27,7 @@ #include "structtreetag.h" #include "kafkacommon.h" -QMap<Node*, int> nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen... +TQMap<Node*, int> nodes; //list of all created nodes. Used to do some own memory management and avoid double deletes, for whatever reason they happen... int NN = 0; //for debugging purposes: count the Node objects @@ -112,10 +112,10 @@ Node::~Node() NN--; } -void Node::save(QDomElement& element) const +void Node::save(TQDomElement& element) const { //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; - QDomElement child_element; + TQDomElement child_element; if(next) { child_element = element.ownerDocument().createElement("nodeNext"); @@ -150,26 +150,26 @@ void Node::save(QDomElement& element) const element.setAttribute("specialInsideXml", specialInsideXml); // bool element.setAttribute("fileName", fileName); // QString -/* QString s_element; - QTextStream stream(&s_element, IO_WriteOnly); +/* TQString s_element; + TQTextStream stream(&s_element, IO_WriteOnly); element.save(stream, 3);*/ //kdDebug(25001) << "Load:\n" << s_element << endl; //kdDebug(25001) << "Save:\n" << element.ownerDocument().toString() << endl; } -bool Node::load(QDomElement const& element) +bool Node::load(TQDomElement const& element) { -/* QString s_element; - QTextStream stream(&s_element, IO_WriteOnly); +/* TQString s_element; + TQTextStream stream(&s_element, IO_WriteOnly); element.save(stream, 3);*/ //kdDebug(25001) << "Load:\n" << s_element << endl; - 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() == "nodeNext") { next = new Node(0); @@ -196,11 +196,11 @@ bool Node::load(QDomElement const& element) } } - closesPrevious = QString(element.attribute("closesPrevious")).toInt(); // bool - opened = QString(element.attribute("opened")).toInt(); // bool - removeAll = QString(element.attribute("removeAll")).toInt(); // bool - insideSpecial = QString(element.attribute("insideSpecial")).toInt(); // bool - specialInsideXml = QString(element.attribute("specialInsideXml")).toInt(); // bool + closesPrevious = TQString(element.attribute("closesPrevious")).toInt(); // bool + opened = TQString(element.attribute("opened")).toInt(); // bool + removeAll = TQString(element.attribute("removeAll")).toInt(); // bool + insideSpecial = TQString(element.attribute("insideSpecial")).toInt(); // bool + specialInsideXml = TQString(element.attribute("specialInsideXml")).toInt(); // bool fileName = element.attribute("fileName"); // QString //kafkaCommon::coutTree(this, 3); @@ -287,21 +287,21 @@ Node *Node::nextNotChild() } } -QString Node::nodeName() +TQString Node::nodeName() { if(tag) return tag->name; - return QString::null; + return TQString::null; } -QString Node::nodeValue() +TQString Node::nodeValue() { if(tag) return tag->tagStr(); - return QString::null; + return TQString::null; } -void Node::setNodeValue(const QString &value) +void Node::setNodeValue(const TQString &value) { if(!tag) tag = new Tag(); @@ -500,7 +500,7 @@ Node *Node::getOpeningNode() int Node::size() { int l = tag->size(); - l += 5*sizeof(Node*) + sizeof(QListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); + l += 5*sizeof(Node*) + sizeof(TQListViewItem*) + 2*sizeof(Tag*) + 2*sizeof(DOM::Node); return l; } @@ -530,7 +530,7 @@ void Node::detachNode() //kdDebug(24000) << &m_groupElements << " " << this << endl; //Remove the references to this node from the list of group elements. //They are actually stored in globalGroupMap. - for (QValueListIterator<GroupElement*> it = m_groupElements.begin(); it != m_groupElements.end(); ++it) + for (TQValueListIterator<GroupElement*> it = m_groupElements.begin(); it != m_groupElements.end(); ++it) { GroupElement *groupElement = (*it); groupElement->node = 0L; @@ -546,7 +546,7 @@ void Node::detachNode() kdDebug(24001) << count << " GroupElement scheduled for deletion. " << &m_groupElements << endl; #endif - QValueListIterator<QListViewItem*> listItem; + TQValueListIterator<TQListViewItem*> listItem; for ( listItem = listItems.begin(); listItem != listItems.end(); ++listItem) { static_cast<StructTreeTag*>(*listItem)->node = 0L; |