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 --- kimagemapeditor/kimagemapeditor.cpp | 96 ++++++++++++++++++------------------- 1 file changed, 48 insertions(+), 48 deletions(-) (limited to 'kimagemapeditor/kimagemapeditor.cpp') diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp index abc6edd1..5a08d551 100644 --- a/kimagemapeditor/kimagemapeditor.cpp +++ b/kimagemapeditor/kimagemapeditor.cpp @@ -1100,7 +1100,7 @@ void KImageMapEditor::slotSelectionChanged() for ( ; it.current() != 0L; ++it) { - if ( it.current()->listViewItem()->isSelected() != (list.tqcontainsRef(it.current()) > 0) ) + if ( it.current()->listViewItem()->isSelected() != (list.containsRef(it.current()) > 0) ) { it.current()->listViewItem()->isSelected() ? select( it.current() ) @@ -1280,7 +1280,7 @@ void KImageMapEditor::updateUpDownBtn() return; } // if the first Area is in the selection can't move up - if (list.tqfind( areas->getFirst() ) == -1) + if (list.find( areas->getFirst() ) == -1) { forwardOneAction->setEnabled(true); areaListView->upBtn->setEnabled(true); @@ -1293,7 +1293,7 @@ void KImageMapEditor::updateUpDownBtn() drawZone->repaintArea(*currentSelected); // if the last Area is in the selection can't move down - if (list.tqfind( areas->getLast() ) == -1) + if (list.find( areas->getLast() ) == -1) { backOneAction->setEnabled(true); areaListView->downBtn->setEnabled(true); @@ -1315,7 +1315,7 @@ void KImageMapEditor::deselectAll() Area* KImageMapEditor::onArea(const TQPoint & p) const { for (Area* s=areas->first();s!=0L;s=areas->next()) { - if (s->tqcontains(p)) + if (s->contains(p)) return s; } return 0L; @@ -1861,9 +1861,9 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c attr=new TQDict(getTagAttributes(s,temp)); origcode.append(temp); - if (attr->tqfind("tagname")) { + if (attr->find("tagname")) { - if (attr->tqfind("tagname")->lower()=="img") { + if (attr->find("tagname")->lower()=="img") { HtmlImgElement *el = new HtmlImgElement(origcode); el->imgTag = static_cast(attr); images->append(el->imgTag); @@ -1871,12 +1871,12 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c origcode = TQString(); } else - if (attr->tqfind("tagname")->lower()=="map") { + if (attr->find("tagname")->lower()=="map") { map = new MapTag(); - map->name=(*attr->tqfind("name")); + map->name=(*attr->find("name")); readMap=true; } else - if (attr->tqfind("tagname")->lower()=="/map") { + if (attr->find("tagname")->lower()=="/map") { readMap=false; maps->append(map); HtmlMapElement *el = new HtmlMapElement(origcode); @@ -1886,7 +1886,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c origcode = TQString(); } else if (readMap) { - if (attr->tqfind("tagname")->lower()=="area") { + if (attr->find("tagname")->lower()=="area") { map->prepend(attr); } } else { @@ -1924,7 +1924,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c if (images->count() == 1) { if (images->first()) { ImageTag* imgTag = images->first(); - TQString *src = imgTag->tqfind("src"); + TQString *src = imgTag->find("src"); if (src) imageUrl = KURL(url,*src); } @@ -1936,12 +1936,12 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c ImageTag* imageTag; for ( imageTag = images->first(); imageTag; imageTag = images->next() ) { - TQString *usemap = imageTag->tqfind("usemap"); + TQString *usemap = imageTag->find("usemap"); if (usemap) { // Remove the # TQString usemapName = usemap->right(usemap->length()-1); if (usemapName == map->name) { - TQString *src = imageTag->tqfind("src"); + TQString *src = imageTag->find("src"); if (src) imageUrl = KURL(url,*src); } @@ -2005,7 +2005,7 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c */ HtmlElement* KImageMapEditor::findHtmlElement(const TQString & containingText) { for (HtmlElement * el = _htmlContent.first(); el; el = _htmlContent.next() ) { - if (el->htmlCode.tqcontains(containingText,false)) { + if (el->htmlCode.contains(containingText,false)) { return el; } } @@ -2038,7 +2038,7 @@ void KImageMapEditor::addMap(const TQString & name = TQString()) { // if we found one add the new map right after the body tag if (bodyTag) { - uint index = _htmlContent.tqfind(bodyTag); + uint index = _htmlContent.find(bodyTag); // Add a newline before the map _htmlContent.insert(index+1, new HtmlElement("\n")); @@ -2160,8 +2160,8 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { for (AreaTag *tag=map->first();tag!=0L;tag=map->next()) { TQString tqshape="rect"; - if (tag->tqfind("tqshape")) - tqshape=*tag->tqfind("tqshape"); + if (tag->find("tqshape")) + tqshape=*tag->find("tqshape"); Area::ShapeType type=Area::Rectangle; if (tqshape=="circle") @@ -2173,35 +2173,35 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { Area* a=AreaCreator::create(type); - if (tag->tqfind("href")) - a->setAttribute("href",*tag->tqfind("href")); + if (tag->find("href")) + a->setAttribute("href",*tag->find("href")); - if (tag->tqfind("alt")) - a->setAttribute("alt",*tag->tqfind("alt")); + if (tag->find("alt")) + a->setAttribute("alt",*tag->find("alt")); - if (tag->tqfind("target")) - a->setAttribute("target",*tag->tqfind("target")); + if (tag->find("target")) + a->setAttribute("target",*tag->find("target")); - if (tag->tqfind("title")) - a->setAttribute("title",*tag->tqfind("title")); + if (tag->find("title")) + a->setAttribute("title",*tag->find("title")); - if (tag->tqfind("onclick")) - a->setAttribute("onclick",*tag->tqfind("onclick")); + if (tag->find("onclick")) + a->setAttribute("onclick",*tag->find("onclick")); - if (tag->tqfind("onmousedown")) - a->setAttribute("onmousedown",*tag->tqfind("onmousedown")); + if (tag->find("onmousedown")) + a->setAttribute("onmousedown",*tag->find("onmousedown")); - if (tag->tqfind("onmouseup")) - a->setAttribute("onmouseup",*tag->tqfind("onmouseup")); + if (tag->find("onmouseup")) + a->setAttribute("onmouseup",*tag->find("onmouseup")); - if (tag->tqfind("onmouseover")) - a->setAttribute("onmouseover",*tag->tqfind("onmouseover")); + if (tag->find("onmouseover")) + a->setAttribute("onmouseover",*tag->find("onmouseover")); - if (tag->tqfind("onmousemove")) - a->setAttribute("onmousemove",*tag->tqfind("onmousemove")); + if (tag->find("onmousemove")) + a->setAttribute("onmousemove",*tag->find("onmousemove")); - if (tag->tqfind("onmouseout")) - a->setAttribute("onmouseout",*tag->tqfind("onmouseout")); + if (tag->find("onmouseout")) + a->setAttribute("onmouseout",*tag->find("onmouseout")); @@ -2211,8 +2211,8 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { continue; } - if (tag->tqfind("coords")) - a->setCoords(*tag->tqfind("coords")); + if (tag->find("coords")) + a->setCoords(*tag->find("coords")); a->setMoving(false); addArea(a); @@ -2375,7 +2375,7 @@ void KImageMapEditor::slotBackOne() // move every selected Area one step lower for (int i=areas->count()-2; i > -1; i--) { - if (list.tqfind( areas->at(i) ) > -1 ) + if (list.find( areas->at(i) ) > -1 ) { a = areas->at(i); areas->remove(a); @@ -2399,7 +2399,7 @@ void KImageMapEditor::slotForwardOne() // move every selected Area one step higher for (int i=1; i < (int)areas->count(); i++) { - if (list.tqfind( areas->at(i) ) > -1 ) + if (list.find( areas->at(i) ) > -1 ) { a = areas->at(i); areas->remove(a); @@ -2683,7 +2683,7 @@ void KImageMapEditor::addImage(const KURL & imgUrl) { HtmlElement *bodyEl = findHtmlElement("selectedImage(); if (selected) { - TQString *url = selected->tqfind("src"); + TQString *url = selected->find("src"); if (url) { setPicture(KURL(*url)); } @@ -2746,11 +2746,11 @@ void KImageMapEditor::imageUsemap() { TQString usemap; - if (imageTag->tqfind("usemap")) - usemap=*imageTag->tqfind("usemap"); + if (imageTag->find("usemap")) + usemap=*imageTag->find("usemap"); TQStringList maps = mapsListView->getMaps(); - int index = maps.tqfindIndex(usemap); + int index = maps.findIndex(usemap); if (index == -1) { maps.prepend(""); index = 0; @@ -2764,7 +2764,7 @@ void KImageMapEditor::imageUsemap() { i18n("Enter the usemap value:"), maps,index,true,&ok,widget()); if (ok) { - imageTag->tqreplace("usemap", new TQString(input)); + imageTag->replace("usemap", new TQString(input)); imagesListView->updateImage(imageTag); setModified(true); @@ -2772,7 +2772,7 @@ void KImageMapEditor::imageUsemap() { HtmlImgElement* imgEl = findHtmlImgElement(imageTag); imgEl->htmlCode = "<"; - TQString *tagName = imgEl->imgTag->tqfind("tagname"); + TQString *tagName = imgEl->imgTag->find("tagname"); imgEl->htmlCode += TQString(*tagName); TQDictIterator it( *imgEl->imgTag ); -- cgit v1.2.1