summaryrefslogtreecommitdiffstats
path: root/microbe/traverser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-29 16:05:55 +0000
commit87a016680e3677da3993f333561e79eb0cead7d5 (patch)
treecbda2b4df8b8ee0d8d1617e6c75bec1e3ee0ccba /microbe/traverser.cpp
parent6ce3d1ad09c1096b5ed3db334e02859e45d5c32b (diff)
downloadktechlab-87a016680e3677da3993f333561e79eb0cead7d5.tar.gz
ktechlab-87a016680e3677da3993f333561e79eb0cead7d5.zip
TQt4 port ktechlab
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ktechlab@1238801 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'microbe/traverser.cpp')
-rw-r--r--microbe/traverser.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/microbe/traverser.cpp b/microbe/traverser.cpp
index e066381..3436d0c 100644
--- a/microbe/traverser.cpp
+++ b/microbe/traverser.cpp
@@ -34,8 +34,8 @@ Traverser::~Traverser()
BTreeNode * Traverser::start()
{
/* To find the start we will iterate, or possibly recurse
- down the tree, each time turning down the node that has children,
- if they both have no children we have reached the end and it shouldn't
+ down the tree, each time turning down the node that has tqchildren,
+ if they both have no tqchildren we have reached the end and it shouldn't
really matter which we pick (check this algorithm) */
BTreeNode *n = m_root;
@@ -54,7 +54,7 @@ BTreeNode * Traverser::start()
else n = n->left();
}
}
- //if(n->parent()) m_current = n->parent();
+ //if(n->tqparent()) m_current = n->tqparent();
//else m_current = n;
m_current = n;
return m_current;
@@ -62,22 +62,22 @@ BTreeNode * Traverser::start()
BTreeNode * Traverser::next()
{
- // a.t.m we will just take the next thing to be the parent.
- if( m_current != m_root ) m_current = m_current->parent();
+ // a.t.m we will just take the next thing to be the tqparent.
+ if( m_current != m_root ) m_current = m_current->tqparent();
return m_current;
}
bool Traverser::onLeftBranch()
{
- return current()->parent()->left() == current();
+ return current()->tqparent()->left() == current();
}
BTreeNode * Traverser::oppositeNode()
{
if ( onLeftBranch() )
- return current()->parent()->right();
+ return current()->tqparent()->right();
else
- return current()->parent()->left();
+ return current()->tqparent()->left();
}
void Traverser::descendLeftwardToTerminal()
@@ -95,6 +95,6 @@ void Traverser::descendLeftwardToTerminal()
void Traverser::moveToParent()
{
- if(current()->parent()) m_current = current()->parent();
+ if(current()->tqparent()) m_current = current()->tqparent();
}