summaryrefslogtreecommitdiffstats
path: root/quanta/components/framewizard/treenode.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/components/framewizard/treenode.cpp')
-rw-r--r--quanta/components/framewizard/treenode.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp
index fcb60231..fd1f187f 100644
--- a/quanta/components/framewizard/treenode.cpp
+++ b/quanta/components/framewizard/treenode.cpp
@@ -19,7 +19,7 @@
static const int SIZE = 101;
-treeNode::treeNode(const QString &l, const QString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){
+treeNode::treeNode(const TQString &l, const TQString &pl) : m_label(l), m_parentLabel(pl), m_splitType(NONE){
m_childrenList.setAutoDelete(true);
m_atts = new areaAttribute;
}
@@ -28,17 +28,17 @@ treeNode::~treeNode(){
delete m_atts;
}
-void treeNode::addChildNode(const QString &l) {
+void treeNode::addChildNode(const TQString &l) {
m_childrenList.append( new treeNode(l,m_label) );
}
-void treeNode::removeChildNode(const QString &l,bool autoDelete) {
+void treeNode::removeChildNode(const TQString &l,bool autoDelete) {
m_childrenList.setAutoDelete(autoDelete);
m_childrenList.remove(findChild(l));
}
-treeNode* treeNode::findChild(const QString &l){
- QPtrListIterator<treeNode> it( m_childrenList );
+treeNode* treeNode::findChild(const TQString &l){
+ TQPtrListIterator<treeNode> it( m_childrenList );
treeNode *node;
while ( (node = it.current()) != 0 ) {
++it;
@@ -50,7 +50,7 @@ treeNode* treeNode::findChild(const QString &l){
int tree::nodeId = 0;
tree::tree(){
- m_root = new treeNode(QString::number(nodeId,10));
+ m_root = new treeNode(TQString::number(nodeId,10));
m_nodeList.resize(SIZE);
}
@@ -68,10 +68,10 @@ void tree::refreshGeometries(treeNode *n){
n->nextChild();
}
- QPtrList<treeNode> list = n->childrenList();
- QPtrListIterator<treeNode> it( list );
+ TQPtrList<treeNode> list = n->childrenList();
+ TQPtrListIterator<treeNode> it( list );
treeNode *node= it.current();
- QRect newGeometry = n->atts()->geometry();
+ TQRect newGeometry = n->atts()->geometry();
if(n->splitType()==VERTICAL){
newGeometry.setHeight(node->atts()->geometry().height());
while ( (node = it.current()) != 0 ) {
@@ -96,30 +96,30 @@ void tree::refreshGeometries(treeNode *n){
}
}
-treeNode* tree::findNode(const QString &l){
+treeNode* tree::findNode(const TQString &l){
if(l==m_root->label()) return m_root;
return m_nodeList.find(l);
}
-QString tree::addChildNode(const QString &l){
+TQString tree::addChildNode(const TQString &l){
treeNode *node;
if( (node = findNode(l)) != 0) {
++nodeId;
- treeNode *newNode = new treeNode(QString::number(nodeId,10),node->label());
+ treeNode *newNode = new treeNode(TQString::number(nodeId,10),node->label());
newNode->atts()->setAttribute( "src",node->atts()->src() );
node->addChildNode(newNode);
- m_nodeList.insert(QString::number(nodeId,10),newNode);
+ m_nodeList.insert(TQString::number(nodeId,10),newNode);
}
- return QString::number(nodeId,10);
+ return TQString::number(nodeId,10);
}
-bool tree::insertChildNode(const QString &l){
- QString parent = findNode(l)->parentLabel();
+bool tree::insertChildNode(const TQString &l){
+ TQString parent = findNode(l)->parentLabel();
int pos=findNode( parent )->childPosition( findNode(l) );
++nodeId;
- treeNode *newNode = new treeNode(QString::number(nodeId,10),parent);
+ treeNode *newNode = new treeNode(TQString::number(nodeId,10),parent);
newNode->atts()->setAttribute( "src",findNode(l)->atts()->src() );
- m_nodeList.insert(QString::number(nodeId,10),newNode);
+ m_nodeList.insert(TQString::number(nodeId,10),newNode);
return findNode( parent )->insertChild(pos,newNode);
}
@@ -130,6 +130,6 @@ void tree::reset(){
m_nodeList.clear();
}
-void tree::removeChildNode(const QString &pl,const QString &l,bool autoDelete){
+void tree::removeChildNode(const TQString &pl,const TQString &l,bool autoDelete){
findNode(pl)->removeChildNode(l,autoDelete);
}