summaryrefslogtreecommitdiffstats
path: root/quanta/components/framewizard/treenode.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/components/framewizard/treenode.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/components/framewizard/treenode.cpp')
-rw-r--r--quanta/components/framewizard/treenode.cpp32
1 files changed, 16 insertions, 16 deletions
diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp
index fd1f187f..0ff7cf74 100644
--- a/quanta/components/framewizard/treenode.cpp
+++ b/quanta/components/framewizard/treenode.cpp
@@ -20,7 +20,7 @@
static const int SIZE = 101;
treeNode::treeNode(const TQString &l, const TQString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){
- m_childrenList.setAutoDelete(true);
+ m_tqchildrenList.setAutoDelete(true);
m_atts = new areaAttribute;
}
@@ -29,16 +29,16 @@ treeNode::~treeNode(){
}
void treeNode::addChildNode(const TQString &l) {
- m_childrenList.append( new treeNode(l,m_label) );
+ m_tqchildrenList.append( new treeNode(l,m_label) );
}
void treeNode::removeChildNode(const TQString &l,bool autoDelete) {
- m_childrenList.setAutoDelete(autoDelete);
- m_childrenList.remove(findChild(l));
+ m_tqchildrenList.setAutoDelete(autoDelete);
+ m_tqchildrenList.remove(findChild(l));
}
treeNode* treeNode::findChild(const TQString &l){
- TQPtrListIterator<treeNode> it( m_childrenList );
+ TQPtrListIterator<treeNode> it( m_tqchildrenList );
treeNode *node;
while ( (node = it.current()) != 0 ) {
++it;
@@ -68,25 +68,25 @@ void tree::refreshGeometries(treeNode *n){
n->nextChild();
}
- TQPtrList<treeNode> list = n->childrenList();
+ TQPtrList<treeNode> list = n->tqchildrenList();
TQPtrListIterator<treeNode> it( list );
treeNode *node= it.current();
- TQRect newGeometry = n->atts()->geometry();
+ TQRect newGeometry = n->atts()->tqgeometry();
if(n->splitType()==VERTICAL){
- newGeometry.setHeight(node->atts()->geometry().height());
+ newGeometry.setHeight(node->atts()->tqgeometry().height());
while ( (node = it.current()) != 0 ) {
++it;
- dim += node->atts()->geometry().width();
+ dim += node->atts()->tqgeometry().width();
dim += 6;
}
newGeometry.setWidth(dim);
}
else
if(n->splitType()==HORIZONTAL){
- newGeometry.setWidth(node->atts()->geometry().width());
+ newGeometry.setWidth(node->atts()->tqgeometry().width());
while ( (node = it.current()) != 0 ) {
++it;
- dim += node->atts()->geometry().height();
+ dim += node->atts()->tqgeometry().height();
dim += 6;
}
newGeometry.setHeight(dim);
@@ -98,7 +98,7 @@ void tree::refreshGeometries(treeNode *n){
treeNode* tree::findNode(const TQString &l){
if(l==m_root->label()) return m_root;
- return m_nodeList.find(l);
+ return m_nodeList.tqfind(l);
}
TQString tree::addChildNode(const TQString &l){
@@ -114,13 +114,13 @@ TQString tree::addChildNode(const TQString &l){
}
bool tree::insertChildNode(const TQString &l){
- TQString parent = findNode(l)->parentLabel();
- int pos=findNode( parent )->childPosition( findNode(l) );
+ TQString tqparent = findNode(l)->tqparentLabel();
+ int pos=findNode( tqparent )->childPosition( findNode(l) );
++nodeId;
- treeNode *newNode = new treeNode(TQString::number(nodeId,10),parent);
+ treeNode *newNode = new treeNode(TQString::number(nodeId,10),tqparent);
newNode->atts()->setAttribute( "src",findNode(l)->atts()->src() );
m_nodeList.insert(TQString::number(nodeId,10),newNode);
- return findNode( parent )->insertChild(pos,newNode);
+ return findNode( tqparent )->insertChild(pos,newNode);
}
void tree::reset(){