summaryrefslogtreecommitdiffstats
path: root/kturtle/src/treenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kturtle/src/treenode.cpp')
-rw-r--r--kturtle/src/treenode.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/kturtle/src/treenode.cpp b/kturtle/src/treenode.cpp
index 0b5619a5..f294a8a8 100644
--- a/kturtle/src/treenode.cpp
+++ b/kturtle/src/treenode.cpp
@@ -58,7 +58,7 @@ TreeNode::~TreeNode()
void TreeNode::init()
{
clear();
- parent = NULL;
+ tqparent = NULL;
// fTok.look (TQString) and fTok.value (Value) are properly init'ed when constructed
fTok.start.row = 0;
fTok.start.col = 0;
@@ -77,23 +77,23 @@ void TreeNode::appendChild(TreeNode* node)
void TreeNode::appendSibling(TreeNode* node)
{
- node->parent = parent;
- if (parent != NULL) parent->push_back(node);
+ node->tqparent = tqparent;
+ if (tqparent != NULL) tqparent->push_back(node);
}
TreeNode* TreeNode::nextSibling()
{
- if (parent)
+ if (tqparent)
{
TreeNode::iterator i = lookup();
- if ( i != parent->end() )
+ if ( i != tqparent->end() )
{
++i;
// Must check after i has been incremented
// to make sure i isn't at the end before
// returning the contained pointer value.
- if ( i != parent->end() ) return *i;
+ if ( i != tqparent->end() ) return *i;
}
}
return NULL;
@@ -101,13 +101,13 @@ TreeNode* TreeNode::nextSibling()
TreeNode* TreeNode::prevSibling()
{
- if (parent)
+ if (tqparent)
{
TreeNode::iterator i = lookup();
// Must make sure we aren't at beginning as well
// or we can crash when decrementing since we shouldn't
// decrement before the start of the list.
- if ( ( i != parent->end() ) && ( i != parent->begin() ) )
+ if ( ( i != tqparent->end() ) && ( i != tqparent->begin() ) )
{
--i;
return *i;
@@ -184,10 +184,10 @@ TreeNode* TreeNode::lastChild()
TreeNode::iterator TreeNode::lookup()
{
- if (parent != NULL)
+ if (tqparent != NULL)
{
- TreeNode::iterator i = parent->begin();
- while ( (*i != this) && (i != parent->end() ) ) ++i;
+ TreeNode::iterator i = tqparent->begin();
+ while ( (*i != this) && (i != tqparent->end() ) ) ++i;
return i;
}
return end();
@@ -201,7 +201,7 @@ TreeNode& TreeNode::operator= (const TreeNode& t)
{
fType = t.fType;
fTok = t.fTok;
- parent = t.parent;
+ tqparent = t.tqparent;
clear();
for (TreeNode::const_iterator i = t.begin(); i != t.end(); ++i)
@@ -248,7 +248,7 @@ void TreeNode::destroy(TreeNode* node)
for ( TreeNode::iterator i = node->begin(); i != node->end(); ++i )
{
destroy(*i);
- (*i)->clear(); //free children
+ (*i)->clear(); //free tqchildren
//delete ( *i ); //free mem
}
}