From 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../components/framewizard/visualframeeditor.cpp | 38 +++++++++++----------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'quanta/components/framewizard/visualframeeditor.cpp') diff --git a/quanta/components/framewizard/visualframeeditor.cpp b/quanta/components/framewizard/visualframeeditor.cpp index 3795a3ce..215bdf63 100644 --- a/quanta/components/framewizard/visualframeeditor.cpp +++ b/quanta/components/framewizard/visualframeeditor.cpp @@ -109,9 +109,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ // then every asterisk must be assigned a percentage of 10% so the real percentage // notation is cols="40%,50%,10%" for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if(!(*it).tqcontains("%") && !(*it).tqcontains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; - if((*it).tqcontains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); - if((*it).tqcontains("*")) { + if(!(*it).contains("%") && !(*it).contains("*")) leftPercentage -= ( (*it).toInt()*100 )/d; + if((*it).contains("%")) leftPercentage -= (*it).section("%",0,0).toInt(); + if((*it).contains("*")) { int weight= (*it).section("*",0,0).toInt(); if( weight==0 ) weight=1; weightAsteriskCounter += weight; @@ -125,7 +125,7 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ // a quelli effettivamente generati dal metodo build che opera un'altra normalizzazione. // In genere la differenza �dell' 1% for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it ) { - if((*it).tqcontains("*")){ + if((*it).contains("*")){ int weight= (*it).section("*",0,0).toInt(); if(weight==0) weight=1; int newPercentage = weight*leftPercentageDistributedAmongAsterisks; @@ -138,9 +138,9 @@ TQStringList VisualFrameEditor::convertAsterisks(const TQString &s,int d){ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ TQString line = m_existingStructure.first(); - if(line.tqcontains("findNode(tqparent)->atts()->tqgeometry(); TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.height()); - int dummyDimension=dummy.height()-cancelledPixels(line.tqcontains(",")+1); + int dummyDimension=dummy.height()-cancelledPixels(line.contains(",")+1); TQPtrList list=m_internalTree->findNode(tqparent)->tqchildrenList(); TQPtrListIterator it( list ); @@ -157,7 +157,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ ++it; TQRect newGeometry(dummy); double newDimension; - if(percentages.first().tqcontains("%")) + if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; else newDimension=(double)percentages.first().toInt(); newGeometry.setHeight( proxInt(newDimension) ); @@ -166,15 +166,15 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ } } else - if(line.tqcontains("cols")) { - split(tqparent,(line.tqcontains(",")+1),VERTICAL); + if(line.contains("cols")) { + split(tqparent,(line.contains(",")+1),VERTICAL); TQRegExp pattern("cols\\s*=\"([\\s\\d%,\\*]*)\""); pattern.search(line); TQRect dummy=m_internalTree->findNode(tqparent)->atts()->tqgeometry(); TQStringList percentages = convertAsterisks(pattern.cap(1),dummy.width()); - int dummyDimension=dummy.width()-cancelledPixels(line.tqcontains(",")+1); + int dummyDimension=dummy.width()-cancelledPixels(line.contains(",")+1); TQPtrList list=m_internalTree->findNode(tqparent)->tqchildrenList(); TQPtrListIterator it( list ); @@ -183,7 +183,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ ++it; TQRect newGeometry(dummy); double newDimension; - if(percentages.first().tqcontains("%")) + if(percentages.first().contains("%")) newDimension=(dummyDimension*(percentages.first().remove("%").toInt()))/100.0; else newDimension=(double)percentages.first().toInt(); newGeometry.setWidth( proxInt(newDimension) ); @@ -201,7 +201,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){ } else { TQMap attributeMap; - if( line.tqcontains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; + if( line.contains( TQRegExp("\\s+noresize") ) ) attributeMap["noresize"] = "noresize"; else attributeMap["noresize"] = TQString(); TQRegExp srcPattern("\\s+src\\s*=\\s*\"([%-\\w\\s\\./_\\+\\d]*)\""); //search for files @@ -287,7 +287,7 @@ void VisualFrameEditor::drawGUI(treeNode *n, TQWidget* tqparent){ if(n->hasChildren()) { TQString splitterName("splitter"+TQString::number(++splitterIdNumber,10)); TQSplitter *splitter = new TQSplitter(tqparent,splitterName.ascii()); - if(SIZES.tqcontains(splitterName)) splitter->setSizes( SIZES[splitterName] ); + if(SIZES.contains(splitterName)) splitter->setSizes( SIZES[splitterName] ); switch( n->splitType() ){ case VERTICAL : splitter->setOrientation(Qt::Horizontal);break; case HORIZONTAL : splitter->setOrientation(Qt::Vertical);break; @@ -421,9 +421,9 @@ TQString VisualFrameEditor::formatStructure(){ TQString s; int tabNum = 0; for ( TQStringList::Iterator it = nonFormattedStructure.begin(); it != nonFormattedStructure.end(); ++it ) { - if((*it).tqcontains("")) { + if((*it).contains("")) { tabNum--; s.truncate(s.length()-1); } @@ -441,9 +441,9 @@ TQString VisualFrameEditor::framesetStructure() { } void VisualFrameEditor::setMarkupLanguage(const TQString& s){ - if( s.tqcontains("xhtml",false)!=0 ) m_markupLanguage = XHTML; + if( s.contains("xhtml",false)!=0 ) m_markupLanguage = XHTML; else - if( s.tqcontains("html",false)!=0 ) m_markupLanguage = HTML; + if( s.contains("html",false)!=0 ) m_markupLanguage = HTML; } #include "visualframeeditor.moc" -- cgit v1.2.1