From 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:51:43 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kimagemapeditor/kimagemapeditor.cpp | 72 ++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 36 deletions(-) (limited to 'kimagemapeditor/kimagemapeditor.cpp') diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp index 6dbb1a32..2c59cf3d 100644 --- a/kimagemapeditor/kimagemapeditor.cpp +++ b/kimagemapeditor/kimagemapeditor.cpp @@ -19,7 +19,7 @@ #include // QT -#include +#include #include #include #include @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -396,7 +396,7 @@ void KImageMapEditor::slotConfigChanged() } updateAllAreas(); - drawZone->viewport()->tqrepaint(); + drawZone->viewport()->repaint(); } void KImageMapEditor::openLastURL(KConfig* config) { @@ -425,7 +425,7 @@ void KImageMapEditor::saveLastURL(KConfig* config) { // kdDebug() << "writing entry lastopenurl : " << url().path() << endl; // kdDebug() << "writing entry lastactivemap : " << mapName() << endl; // kdDebug() << "writing entry lastactiveimage : " << _imageUrl.path() << endl; - //KMessageBox::information(0L, TQString("Group: %1 Saving ... %2").tqarg(config->group()).tqarg(url().path())); + //KMessageBox::information(0L, TQString("Group: %1 Saving ... %2").arg(config->group()).arg(url().path())); } void KImageMapEditor::setupActions() @@ -736,7 +736,7 @@ void KImageMapEditor::showPopupMenu(const TQPoint & pos, const TQString & name) TQPopupMenu* pop = static_cast(factory()->container(name, this)); if (!pop) { - kdWarning() << TQString("KImageMapEditorPart: Missing XML definition for %1\n").tqarg(name) << endl; + kdWarning() << TQString("KImageMapEditorPart: Missing XML definition for %1\n").arg(name) << endl; return; } @@ -794,8 +794,8 @@ void KImageMapEditor::updateStatusBar() void KImageMapEditor::slotChangeStatusCoords(int x,int y) { -// statusBar()->changeItem(TQString(" Cursor : x: %1 ,y: %2 ").tqarg(x).tqarg(y),STATUS_CURSOR); - cursorStatusText = i18n(" Cursor: x: %1, y: %2 ").tqarg(x).tqarg(y); +// statusBar()->changeItem(TQString(" Cursor : x: %1 ,y: %2 ").arg(x).arg(y),STATUS_CURSOR); + cursorStatusText = i18n(" Cursor: x: %1, y: %2 ").arg(x).arg(y); updateStatusBar(); } @@ -803,7 +803,7 @@ void KImageMapEditor::slotUpdateSelectionCoords() { if (selected()->count()>0) { TQRect r=selected()->rect(); // statusBar()->changeItem( - selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").tqarg(r.left()).tqarg(r.top()).tqarg(r.width()).tqarg(r.height()); + selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").arg(r.left()).arg(r.top()).arg(r.width()).arg(r.height()); // ,STATUS_SELECTION); kapp->processEvents(); @@ -816,7 +816,7 @@ void KImageMapEditor::slotUpdateSelectionCoords() { void KImageMapEditor::slotUpdateSelectionCoords( const TQRect & r ) { - selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").tqarg(r.left()).tqarg(r.top()).tqarg(r.width()).tqarg(r.height()); + selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").arg(r.left()).arg(r.top()).arg(r.width()).arg(r.height()); updateStatusBar(); kapp->processEvents(); } @@ -990,7 +990,7 @@ void KImageMapEditor::deleteArea( Area * area ) { if (!area) return; - // only for tqrepaint reasons + // only for repaint reasons TQRect redrawRect = area->selectionRect(); // Perhaps we've got a selection of areas @@ -1055,7 +1055,7 @@ void KImageMapEditor::deleteAllAreas() a=areas->first(); // because the current is deleted } - drawZone->viewport()->tqrepaint(); + drawZone->viewport()->repaint(); } @@ -1065,7 +1065,7 @@ void KImageMapEditor::updateAllAreas() for (Area* a=areas->first();a!=0L;a=areas->next()) { a->listViewItem()->setPixmap(1,makeListViewPix(*a)); } - drawZone->viewport()->tqrepaint(); + drawZone->viewport()->repaint(); } void KImageMapEditor::updateSelection() const { @@ -1407,10 +1407,10 @@ void KImageMapEditor::setPicture(const KURL & url) { imageUsemapAction->setEnabled(true); } else - kdError() << TQString("The image %1 could not be opened.").tqarg(url.path()) << endl; + kdError() << TQString("The image %1 could not be opened.").arg(url.path()) << endl; } else - kdError() << TQString("The image %1 does not exist.").tqarg(url.path()) << endl; + kdError() << TQString("The image %1 does not exist.").arg(url.path()) << endl; } void KImageMapEditor::setPicture(const TQImage & pix) { @@ -1519,7 +1519,7 @@ void KImageMapEditor::mapEditName() if (ok) { if (input != _mapName) { if (mapsListView->nameAlreadyExists(input)) - KMessageBox::sorry(this->widget(), i18n("The name %1 already exists.").tqarg(input)); + KMessageBox::sorry(this->widget(), i18n("The name %1 already exists.").arg(input)); else { setMapName(input); } @@ -1622,12 +1622,12 @@ void KImageMapEditor::fileSaveAs() { if ( fileInfo.exists() ) { if (KMessageBox::warningContinueCancel(widget(), - i18n("The file %1 already exists.
Do you want to overwrite it?
").tqarg(fileInfo.fileName()), + i18n("The file %1 already exists.
Do you want to overwrite it?
").arg(fileInfo.fileName()), i18n("Overwrite File?"), i18n("Overwrite"))==KMessageBox::Cancel) return; if(!fileInfo.isWritable()) { - KMessageBox::sorry(widget(), i18n("You do not have write permission for the file %1.").tqarg(fileInfo.fileName())); + KMessageBox::sorry(widget(), i18n("You do not have write permission for the file %1.").arg(fileInfo.fileName())); return; } } @@ -1646,14 +1646,14 @@ bool KImageMapEditor::openFile() if ( !fileInfo.exists() ) { KMessageBox::information(widget(), - i18n("The file %1 does not exist.").tqarg(fileInfo.fileName()), + i18n("The file %1 does not exist.").arg(fileInfo.fileName()), i18n("File Does Not Exist")); return false; } openHTMLFile(url()); - drawZone->viewport()->tqrepaint(); + drawZone->viewport()->repaint(); recentFilesAction->addURL(url()); setModified(false); backupFileCreated = false; @@ -2107,16 +2107,16 @@ void KImageMapEditor::saveAreasToMapTag(MapTag* map) { map->clear(); for (Area* a=areas->first();a!=0L;a=areas->next()) { TQDict *dict = new TQDict(17,false); - TQString *tqshapeStr = 0L; + TQString *shapeStr = 0L; switch (a->type()) { - case Area::Rectangle : tqshapeStr = new TQString("rect");break; - case Area::Circle : tqshapeStr = new TQString("circle");break; - case Area::Polygon : tqshapeStr = new TQString("poly");break; + case Area::Rectangle : shapeStr = new TQString("rect");break; + case Area::Circle : shapeStr = new TQString("circle");break; + case Area::Polygon : shapeStr = new TQString("poly");break; default : continue; } - dict->insert("tqshape",tqshapeStr); + dict->insert("shape",shapeStr); for (AttributeIterator it = a->firstAttribute();it!=a->lastAttribute();++it) { dict->insert(it.key(),new TQString(it.data())); @@ -2130,7 +2130,7 @@ void KImageMapEditor::saveAreasToMapTag(MapTag* map) { if (defaultArea && defaultArea->finished()) { TQDict *dict = new TQDict(17,false); - dict->insert("tqshape",new TQString("default")); + dict->insert("shape",new TQString("default")); for (AttributeIterator it = defaultArea->firstAttribute();it!=defaultArea->lastAttribute();++it) { dict->insert(it.key(),new TQString(it.data())); @@ -2159,16 +2159,16 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) { _mapName = map->name; for (AreaTag *tag=map->first();tag!=0L;tag=map->next()) { - TQString tqshape="rect"; - if (tag->find("tqshape")) - tqshape=*tag->find("tqshape"); + TQString shape="rect"; + if (tag->find("shape")) + shape=*tag->find("shape"); Area::ShapeType type=Area::Rectangle; - if (tqshape=="circle") + if (shape=="circle") type=Area::Circle; - else if (tqshape=="poly") + else if (shape=="poly") type=Area::Polygon; - else if (tqshape=="default") + else if (shape=="default") type=Area::Default; Area* a=AreaCreator::create(type); @@ -2267,7 +2267,7 @@ void KImageMapEditor::saveImageMap(const KURL & url) if (!TQFileInfo(url.directory()).isWritable()) { KMessageBox::error(widget(), - i18n("The file %1 could not be saved, because you do not have the required write permissions.").tqarg(url.path())); + i18n("The file %1 could not be saved, because you do not have the required write permissions.").arg(url.path())); return; } @@ -2556,7 +2556,7 @@ void KImageMapEditor::slotHightlightAreas() // highlightAreasAction->setChecked(b); Area::highlightArea = b; updateAllAreas(); - drawZone->viewport()->tqrepaint(); + drawZone->viewport()->repaint(); } void KImageMapEditor::slotShowAltTag() @@ -2564,7 +2564,7 @@ void KImageMapEditor::slotShowAltTag() bool b = showAltAction->isChecked(); // showAltAction->setChecked(b); Area::showAlt = b; - drawZone->viewport()->tqrepaint(); + drawZone->viewport()->repaint(); } void KImageMapEditor::mapNew() @@ -2583,7 +2583,7 @@ void KImageMapEditor::mapDelete() int result = KMessageBox::warningContinueCancel(widget(), i18n("Are you sure you want to delete the map %1?" - "
There is no way to undo this.
").tqarg(selectedMap), + "
There is no way to undo this.").arg(selectedMap), i18n("Delete Map?"),KGuiItem(i18n("&Delete"),"editdelete")); if (result == KMessageBox::No) @@ -2631,7 +2631,7 @@ bool KImageMapEditor::queryClose() { return true; switch ( KMessageBox::warningYesNoCancel( widget(), - i18n("The file %1 has been modified.
Do you want to save it?
").tqarg(url().fileName()), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) ) { + i18n("The file %1 has been modified.
Do you want to save it?
").arg(url().fileName()), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) ) { case KMessageBox::Yes : saveFile(); return true; -- cgit v1.2.1