diff options
Diffstat (limited to 'quanta/components/framewizard')
-rw-r--r-- | quanta/components/framewizard/fmfpeditors.ui | 2 | ||||
-rw-r--r-- | quanta/components/framewizard/fmrceditors.ui | 2 | ||||
-rw-r--r-- | quanta/components/framewizard/framewizards.ui | 2 | ||||
-rw-r--r-- | quanta/components/framewizard/treenode.cpp | 2 | ||||
-rw-r--r-- | quanta/components/framewizard/treenode.h | 2 | ||||
-rw-r--r-- | quanta/components/framewizard/visualframeeditor.cpp | 46 |
6 files changed, 28 insertions, 28 deletions
diff --git a/quanta/components/framewizard/fmfpeditors.ui b/quanta/components/framewizard/fmfpeditors.ui index bcfb43c1..46a5354a 100644 --- a/quanta/components/framewizard/fmfpeditors.ui +++ b/quanta/components/framewizard/fmfpeditors.ui @@ -537,5 +537,5 @@ </connection> </connections> <pixmapinproject/> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/quanta/components/framewizard/fmrceditors.ui b/quanta/components/framewizard/fmrceditors.ui index d85bb0da..e0a8926c 100644 --- a/quanta/components/framewizard/fmrceditors.ui +++ b/quanta/components/framewizard/fmrceditors.ui @@ -145,5 +145,5 @@ <slot>reject()</slot> </connection> </connections> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> </UI> diff --git a/quanta/components/framewizard/framewizards.ui b/quanta/components/framewizard/framewizards.ui index 6f3d030e..cde1611f 100644 --- a/quanta/components/framewizard/framewizards.ui +++ b/quanta/components/framewizard/framewizards.ui @@ -362,7 +362,7 @@ </connection> </connections> <pixmapinproject/> -<tqlayoutdefaults spacing="6" margin="11"/> +<layoutdefaults spacing="6" margin="11"/> <includehints> <includehint>visualframeeditor.h</includehint> </includehints> diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp index 0ff7cf74..ecf42bf8 100644 --- a/quanta/components/framewizard/treenode.cpp +++ b/quanta/components/framewizard/treenode.cpp @@ -114,7 +114,7 @@ TQString tree::addChildNode(const TQString &l){ } bool tree::insertChildNode(const TQString &l){ - TQString tqparent = findNode(l)->tqparentLabel(); + TQString tqparent = findNode(l)->parentLabel(); int pos=findNode( tqparent )->childPosition( findNode(l) ); ++nodeId; treeNode *newNode = new treeNode(TQString::number(nodeId,10),tqparent); diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h index 6680e443..a1d568a6 100644 --- a/quanta/components/framewizard/treenode.h +++ b/quanta/components/framewizard/treenode.h @@ -49,7 +49,7 @@ class treeNode { int childPosition(treeNode* n){ return m_tqchildrenList.tqfind(n); } bool insertChild(unsigned int pos, treeNode* n) { return m_tqchildrenList.insert( pos, n); } TQString label() const { return m_label; } - TQString tqparentLabel() const { return m_parentLabel; } + TQString parentLabel() const { return m_parentLabel; } SplitType splitType() const { return m_splitType; } TQPtrList<treeNode> tqchildrenList() { return m_tqchildrenList; } diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index ff32277b..3795a3ce 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -76,17 +76,17 @@ void VisualFrameEditor::split(const TQString &l, int n, SplitType type) { setGeometries(l); } else { - TQString tqparentLabel=m_internalTree->findNode(l)->tqparentLabel(); - SplitType tqparentSplit=m_internalTree->findNode(tqparentLabel)->splitType(); - if( tqparentSplit != type ) { + TQString parentLabel=m_internalTree->findNode(l)->parentLabel(); + SplitType parentSplit=m_internalTree->findNode(parentLabel)->splitType(); + if( parentSplit != type ) { m_internalTree->findNode(l)->setSplitType(type); for(int i = 1; i<=n; i++) m_internalTree->addChildNode(l); setGeometries(l); } else { for(int i = 1; i<=n; i++) m_internalTree->insertChildNode(l); - m_internalTree->findNode(tqparentLabel)->removeChildNode(l,true); - setGeometries(m_internalTree->findNode(tqparentLabel)->label()); + m_internalTree->findNode(parentLabel)->removeChildNode(l,true); + setGeometries(m_internalTree->findNode(parentLabel)->label()); } } } @@ -246,23 +246,23 @@ void VisualFrameEditor::paintEvent ( TQPaintEvent * ){ void VisualFrameEditor::removeNode(const TQString &l){ if( l == m_internalTree->root()->label() ) m_internalTree->reset();//trying to remove root node is equivalent to reinitialize else { - TQString tqparentLabel=m_internalTree->findNode(l)->tqparentLabel(); - if(m_internalTree->findNode(tqparentLabel)->countChildren()>=3) - m_internalTree->removeChildNode(tqparentLabel,l,true); + TQString parentLabel=m_internalTree->findNode(l)->parentLabel(); + if(m_internalTree->findNode(parentLabel)->countChildren()>=3) + m_internalTree->removeChildNode(parentLabel,l,true); else { - m_internalTree->removeChildNode(tqparentLabel,l,true); - if( !m_internalTree->findNode(tqparentLabel)->firstChild()->hasChildren() ){ //final nodes - TQMap<TQString,TQString> map = m_internalTree->findNode(tqparentLabel)->firstChild()->atts()->attributeMap(); - m_internalTree->findNode(tqparentLabel)->removeChildren(); - m_internalTree->findNode(tqparentLabel)->atts()->setAllAttributes( map ) ; - m_internalTree->findNode(tqparentLabel)->setSplitType(NONE); + m_internalTree->removeChildNode(parentLabel,l,true); + if( !m_internalTree->findNode(parentLabel)->firstChild()->hasChildren() ){ //final nodes + TQMap<TQString,TQString> map = m_internalTree->findNode(parentLabel)->firstChild()->atts()->attributeMap(); + m_internalTree->findNode(parentLabel)->removeChildren(); + m_internalTree->findNode(parentLabel)->atts()->setAllAttributes( map ) ; + m_internalTree->findNode(parentLabel)->setSplitType(NONE); } else { - TQPtrList<treeNode> list = m_internalTree->findNode(tqparentLabel)->firstChild()->tqchildrenList(); - if( tqparentLabel != m_internalTree->root()->label() ) { - TQString grandParentLabel = m_internalTree->findNode(tqparentLabel)->tqparentLabel(); - m_internalTree->removeChildNode( tqparentLabel,m_internalTree->findNode(tqparentLabel)->firstChild()->label(),false ); - m_internalTree->removeChildNode( grandParentLabel ,tqparentLabel, true ); + TQPtrList<treeNode> list = m_internalTree->findNode(parentLabel)->firstChild()->tqchildrenList(); + if( parentLabel != m_internalTree->root()->label() ) { + TQString grandParentLabel = m_internalTree->findNode(parentLabel)->parentLabel(); + m_internalTree->removeChildNode( parentLabel,m_internalTree->findNode(parentLabel)->firstChild()->label(),false ); + m_internalTree->removeChildNode( grandParentLabel ,parentLabel, true ); treeNode *node; for ( node = list.first(); node; node = list.next() ) { node->setParentLabel(grandParentLabel); @@ -270,12 +270,12 @@ void VisualFrameEditor::removeNode(const TQString &l){ } } else { - m_internalTree->findNode(tqparentLabel)->setSplitType( m_internalTree->findNode(tqparentLabel)->firstChild()->splitType() ); - m_internalTree->removeChildNode( tqparentLabel,m_internalTree->findNode(tqparentLabel)->firstChild()->label(),false ); + m_internalTree->findNode(parentLabel)->setSplitType( m_internalTree->findNode(parentLabel)->firstChild()->splitType() ); + m_internalTree->removeChildNode( parentLabel,m_internalTree->findNode(parentLabel)->firstChild()->label(),false ); treeNode *node; for ( node = list.first(); node; node = list.next() ) { - node->setParentLabel(tqparentLabel); - m_internalTree->findNode(tqparentLabel)->addChildNode(node); + node->setParentLabel(parentLabel); + m_internalTree->findNode(parentLabel)->addChildNode(node); } } } |