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.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/kturtle/src/treenode.cpp b/kturtle/src/treenode.cpp
index f294a8a8..0579af7e 100644
--- a/kturtle/src/treenode.cpp
+++ b/kturtle/src/treenode.cpp
@@ -58,7 +58,7 @@ TreeNode::~TreeNode()
void TreeNode::init()
{
clear();
- tqparent = NULL;
+ parent = 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->tqparent = tqparent;
- if (tqparent != NULL) tqparent->push_back(node);
+ node->parent = parent;
+ if (parent != NULL) parent->push_back(node);
}
TreeNode* TreeNode::nextSibling()
{
- if (tqparent)
+ if (parent)
{
TreeNode::iterator i = lookup();
- if ( i != tqparent->end() )
+ if ( i != parent->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 != tqparent->end() ) return *i;
+ if ( i != parent->end() ) return *i;
}
}
return NULL;
@@ -101,13 +101,13 @@ TreeNode* TreeNode::nextSibling()
TreeNode* TreeNode::prevSibling()
{
- if (tqparent)
+ if (parent)
{
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 != tqparent->end() ) && ( i != tqparent->begin() ) )
+ if ( ( i != parent->end() ) && ( i != parent->begin() ) )
{
--i;
return *i;
@@ -184,10 +184,10 @@ TreeNode* TreeNode::lastChild()
TreeNode::iterator TreeNode::lookup()
{
- if (tqparent != NULL)
+ if (parent != NULL)
{
- TreeNode::iterator i = tqparent->begin();
- while ( (*i != this) && (i != tqparent->end() ) ) ++i;
+ TreeNode::iterator i = parent->begin();
+ while ( (*i != this) && (i != parent->end() ) ) ++i;
return i;
}
return end();
@@ -201,7 +201,7 @@ TreeNode& TreeNode::operator= (const TreeNode& t)
{
fType = t.fType;
fTok = t.fTok;
- tqparent = t.tqparent;
+ parent = t.parent;
clear();
for (TreeNode::const_iterator i = t.begin(); i != t.end(); ++i)