summaryrefslogtreecommitdiffstats
path: root/quanta/components/framewizard
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (patch)
tree629d3942958745660e36c30b0d6139af9459c0f8 /quanta/components/framewizard
parent929d7ae4f69d62b8f1f6d3506adf75f017753935 (diff)
downloadtdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.tar.gz
tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.zip
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
Diffstat (limited to 'quanta/components/framewizard')
-rw-r--r--quanta/components/framewizard/treenode.cpp2
-rw-r--r--quanta/components/framewizard/treenode.h2
-rw-r--r--quanta/components/framewizard/visualframeeditor.cpp38
3 files changed, 21 insertions, 21 deletions
diff --git a/quanta/components/framewizard/treenode.cpp b/quanta/components/framewizard/treenode.cpp
index ecf42bf8..592d33d5 100644
--- a/quanta/components/framewizard/treenode.cpp
+++ b/quanta/components/framewizard/treenode.cpp
@@ -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.tqfind(l);
+ return m_nodeList.find(l);
}
TQString tree::addChildNode(const TQString &l){
diff --git a/quanta/components/framewizard/treenode.h b/quanta/components/framewizard/treenode.h
index a1d568a6..428a381f 100644
--- a/quanta/components/framewizard/treenode.h
+++ b/quanta/components/framewizard/treenode.h
@@ -46,7 +46,7 @@ class treeNode {
void setLabel(const TQString &l) { m_label = l; }
void removeChildren() { m_tqchildrenList.clear(); }
void setParentLabel(const TQString &s){ m_parentLabel = s;}
- int childPosition(treeNode* n){ return m_tqchildrenList.tqfind(n); }
+ int childPosition(treeNode* n){ return m_tqchildrenList.find(n); }
bool insertChild(unsigned int pos, treeNode* n) { return m_tqchildrenList.insert( pos, n); }
TQString label() const { return m_label; }
TQString parentLabel() const { return m_parentLabel; }
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("<frameset")) {
- if(line.tqcontains("rows")) {
- split(tqparent,(line.tqcontains(",")+1),HORIZONTAL);
+ if(line.contains("<frameset")) {
+ if(line.contains("rows")) {
+ split(tqparent,(line.contains(",")+1),HORIZONTAL);
TQRegExp pattern("rows\\s*=\"([\\s\\d%,\\*]*)\"");
pattern.search(line);
@@ -148,7 +148,7 @@ void VisualFrameEditor::buildInternalTree(const TQString &tqparent){
TQRect dummy=m_internalTree->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<treeNode> list=m_internalTree->findNode(tqparent)->tqchildrenList();
TQPtrListIterator<treeNode> 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<treeNode> list=m_internalTree->findNode(tqparent)->tqchildrenList();
TQPtrListIterator<treeNode> 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<TQString,TQString> 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("<frameset")) tabNum++;
+ if((*it).contains("<frameset")) tabNum++;
else
- if((*it).tqcontains("</frameset>")) {
+ if((*it).contains("</frameset>")) {
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"