summaryrefslogtreecommitdiffstats
path: root/kturtle/src/treenode.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-11 04:44:41 +0000
commita374efce3a207b39514be3c52264091400ce297e (patch)
tree77bdf654b55826d4f59b53a5621310206bcaead1 /kturtle/src/treenode.cpp
parentf81a494f3957d5cf38c787973415597941934727 (diff)
downloadtdeedu-a374efce3a207b39514be3c52264091400ce297e.tar.gz
tdeedu-a374efce3a207b39514be3c52264091400ce297e.zip
TQt4 port kdeedu
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeedu@1236073 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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
}
}