From 1fffbdafa12271a1a635caf46777fb8acfb6f31b Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Fri, 16 Dec 2011 10:00:36 -0600 Subject: Revert "Rename a number of old tq methods that are no longer tq specific" This reverts commit 2b0e1de2ffcca7bb93f1fd8ddd32f74041d0d076. --- kimagemapeditor/drawzone.cpp | 6 +- kimagemapeditor/drawzone.h | 2 +- kimagemapeditor/imagemap.cpp | 2 +- kimagemapeditor/kimagemapeditor.cpp | 72 ++++++++--------- kimagemapeditor/kimearea.cpp | 80 +++++++++--------- kimagemapeditor/kimearea.h | 4 +- kimagemapeditor/kimecommands.cpp | 20 ++--- kimagemapeditor/kimedialogs.cpp | 156 ++++++++++++++++++------------------ kimagemapeditor/kimedialogs.h | 2 +- kimagemapeditor/kimeshell.cpp | 4 +- 10 files changed, 174 insertions(+), 174 deletions(-) (limited to 'kimagemapeditor') diff --git a/kimagemapeditor/drawzone.cpp b/kimagemapeditor/drawzone.cpp index d6fdc2d1..ba1ea48d 100644 --- a/kimagemapeditor/drawzone.cpp +++ b/kimagemapeditor/drawzone.cpp @@ -545,7 +545,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e) drawCurrent=translateFromZoom(drawCurrent); if (currentAction==DrawRectangle) { - // To avoid flicker, only repaint the minimum rect + // To avoid flicker, only tqrepaint the minimum rect TQRect oldRect=translateToZoom(currentArea->rect()); currentArea->setRect(TQRect(drawStart,drawCurrent).normalize()); TQRect newRect=translateToZoom(currentArea->selectionRect()); @@ -629,10 +629,10 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e) imageMapEditor->deselectWithoutUpdate( it.current() ); } */ - // We don't have to repaint the hole selection rectangle + // We don't have to tqrepaint the hole selection rectangle // only the borders have to be repainted. // So we have to create 4 rectangles for every rectangle - // which represent the borders and then repaint them. + // which represent the borders and then tqrepaint them. TQRect lb,rb,tb,bb; createBorderRectangles(translateToZoom(r),lb,rb,tb,bb); diff --git a/kimagemapeditor/drawzone.h b/kimagemapeditor/drawzone.h index d9b564a6..3934a8aa 100644 --- a/kimagemapeditor/drawzone.h +++ b/kimagemapeditor/drawzone.h @@ -97,7 +97,7 @@ private: KImageMapEditor *imageMapEditor; // Only the rect of the zoomed image, perhaps redundant TQRect imageRect; - // Only for repaint issues + // Only for tqrepaint issues Area *oldArea; TQRect oldSelectionRect; diff --git a/kimagemapeditor/imagemap.cpp b/kimagemapeditor/imagemap.cpp index 4489508d..04c1908e 100644 --- a/kimagemapeditor/imagemap.cpp +++ b/kimagemapeditor/imagemap.cpp @@ -259,7 +259,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) { drawCurrent=translateFromZoom(drawCurrent); if (currentAction==DrawRectangle) { - // To avoid flicker, only repaint the minimum rect + // To avoid flicker, only tqrepaint the minimum rect TQRect oldRect=translateToZoom(currentArea->rect()); currentArea->setRect(TQRect(drawStart,drawCurrent).normalize()); TQRect newRect=translateToZoom(currentArea->rect()); diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp index 2c59cf3d..6dbb1a32 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()->repaint(); + drawZone->viewport()->tqrepaint(); } 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").arg(config->group()).arg(url().path())); + //KMessageBox::information(0L, TQString("Group: %1 Saving ... %2").tqarg(config->group()).tqarg(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").arg(name) << endl; + kdWarning() << TQString("KImageMapEditorPart: Missing XML definition for %1\n").tqarg(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 ").arg(x).arg(y),STATUS_CURSOR); - cursorStatusText = i18n(" Cursor: x: %1, y: %2 ").arg(x).arg(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); 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 ").arg(r.left()).arg(r.top()).arg(r.width()).arg(r.height()); + selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").tqarg(r.left()).tqarg(r.top()).tqarg(r.width()).tqarg(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 ").arg(r.left()).arg(r.top()).arg(r.width()).arg(r.height()); + selectionStatusText = i18n(" Selection: x: %1, y: %2, w: %3, h: %4 ").tqarg(r.left()).tqarg(r.top()).tqarg(r.width()).tqarg(r.height()); updateStatusBar(); kapp->processEvents(); } @@ -990,7 +990,7 @@ void KImageMapEditor::deleteArea( Area * area ) { if (!area) return; - // only for repaint reasons + // only for tqrepaint 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()->repaint(); + drawZone->viewport()->tqrepaint(); } @@ -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()->repaint(); + drawZone->viewport()->tqrepaint(); } 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.").arg(url.path()) << endl; + kdError() << TQString("The image %1 could not be opened.").tqarg(url.path()) << endl; } else - kdError() << TQString("The image %1 does not exist.").arg(url.path()) << endl; + kdError() << TQString("The image %1 does not exist.").tqarg(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.").arg(input)); + KMessageBox::sorry(this->widget(), i18n("The name %1 already exists.").tqarg(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?
").arg(fileInfo.fileName()), + i18n("The file %1 already exists.
Do you want to overwrite it?
").tqarg(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.").arg(fileInfo.fileName())); + KMessageBox::sorry(widget(), i18n("You do not have write permission for the file %1.").tqarg(fileInfo.fileName())); return; } } @@ -1646,14 +1646,14 @@ bool KImageMapEditor::openFile() if ( !fileInfo.exists() ) { KMessageBox::information(widget(), - i18n("The file %1 does not exist.").arg(fileInfo.fileName()), + i18n("The file %1 does not exist.").tqarg(fileInfo.fileName()), i18n("File Does Not Exist")); return false; } openHTMLFile(url()); - drawZone->viewport()->repaint(); + drawZone->viewport()->tqrepaint(); 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 *shapeStr = 0L; + TQString *tqshapeStr = 0L; switch (a->type()) { - case Area::Rectangle : shapeStr = new TQString("rect");break; - case Area::Circle : shapeStr = new TQString("circle");break; - case Area::Polygon : shapeStr = new TQString("poly");break; + case Area::Rectangle : tqshapeStr = new TQString("rect");break; + case Area::Circle : tqshapeStr = new TQString("circle");break; + case Area::Polygon : tqshapeStr = new TQString("poly");break; default : continue; } - dict->insert("shape",shapeStr); + dict->insert("tqshape",tqshapeStr); 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("shape",new TQString("default")); + dict->insert("tqshape",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 shape="rect"; - if (tag->find("shape")) - shape=*tag->find("shape"); + TQString tqshape="rect"; + if (tag->find("tqshape")) + tqshape=*tag->find("tqshape"); Area::ShapeType type=Area::Rectangle; - if (shape=="circle") + if (tqshape=="circle") type=Area::Circle; - else if (shape=="poly") + else if (tqshape=="poly") type=Area::Polygon; - else if (shape=="default") + else if (tqshape=="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.").arg(url.path())); + i18n("The file %1 could not be saved, because you do not have the required write permissions.").tqarg(url.path())); return; } @@ -2556,7 +2556,7 @@ void KImageMapEditor::slotHightlightAreas() // highlightAreasAction->setChecked(b); Area::highlightArea = b; updateAllAreas(); - drawZone->viewport()->repaint(); + drawZone->viewport()->tqrepaint(); } void KImageMapEditor::slotShowAltTag() @@ -2564,7 +2564,7 @@ void KImageMapEditor::slotShowAltTag() bool b = showAltAction->isChecked(); // showAltAction->setChecked(b); Area::showAlt = b; - drawZone->viewport()->repaint(); + drawZone->viewport()->tqrepaint(); } 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.
").arg(selectedMap), + "
There is no way to undo this.").tqarg(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?
").arg(url().fileName()), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) ) { + i18n("The file %1 has been modified.
Do you want to save it?
").tqarg(url().fileName()), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) ) { case KMessageBox::Yes : saveFile(); return true; diff --git a/kimagemapeditor/kimearea.cpp b/kimagemapeditor/kimearea.cpp index 835cdf55..52cccf9f 100644 --- a/kimagemapeditor/kimearea.cpp +++ b/kimagemapeditor/kimearea.cpp @@ -21,8 +21,8 @@ #include #include #include -#include -#include +#include +#include #include #include @@ -336,10 +336,10 @@ void Area::drawAlt(TQPainter & p) { double x,y; - double scalex = p.worldMatrix().m11(); -// double scaley = p.worldMatrix().m12(); + double scalex = p.tqworldMatrix().m11(); +// double scaley = p.tqworldMatrix().m12(); - TQWMatrix oldMatrix = p.worldMatrix(); + TQWMatrix oldMatrix = p.tqworldMatrix(); p.setWorldMatrix(TQWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() )); @@ -379,10 +379,10 @@ void Area::draw(TQPainter & p) { int i=0; - double scalex = p.worldMatrix().m11(); -// double scaley = p.worldMatrix().m12(); + double scalex = p.tqworldMatrix().m11(); +// double scaley = p.tqworldMatrix().m12(); - TQWMatrix oldMatrix = p.worldMatrix(); + TQWMatrix oldMatrix = p.tqworldMatrix(); p.setWorldMatrix(TQWMatrix(1,oldMatrix.m12(), oldMatrix.m21(), 1, oldMatrix.dx(), oldMatrix.dy() )); @@ -675,10 +675,10 @@ TQBitmap RectArea::getMask() const TQString RectArea::coordsToString() const { TQString retStr=TQString("%1,%2,%3,%4") - .arg(rect().left()) - .arg(rect().top()) - .arg(rect().right()) - .arg(rect().bottom()); + .tqarg(rect().left()) + .tqarg(rect().top()) + .tqarg(rect().right()) + .tqarg(rect().bottom()); return retStr; } @@ -747,7 +747,7 @@ bool RectArea::setCoords(const TQString & s) TQString RectArea::getHTMLCode() const { TQString retStr; retStr+="count()); + p.tqdrawPolygon ( *_coords,false,0,_coords->count()); else - p.drawPolyline ( *_coords,0,_coords->count()); + p.tqdrawPolyline ( *_coords,0,_coords->count()); /* p.moveTo(_coords->point(0)); @@ -1033,8 +1033,8 @@ TQString PolyArea::coordsToString() const for (uint i=0;i<_coords->count();i++) { retStr.append(TQString("%1,%2,") - .arg(_coords->point(i).x()) - .arg(_coords->point(i).y())); + .tqarg(_coords->point(i).x()) + .tqarg(_coords->point(i).y())); } retStr.remove(retStr.length()-1,1); @@ -1224,7 +1224,7 @@ bool PolyArea::setCoords(const TQString & s) TQString PolyArea::getHTMLCode() const { TQString retStr; retStr+="setSelected( false ); _areas->remove( a ); - invalidate(); + tqinvalidate(); } void AreaSelection::reset() @@ -1375,7 +1375,7 @@ void AreaSelection::reset() } _areas->clear(); - invalidate(); + tqinvalidate(); } bool AreaSelection::contains(const TQPoint & p) const @@ -1423,7 +1423,7 @@ void AreaSelection::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p _areas->getFirst()->moveSelectionPoint(selectionPoint,p); - invalidate(); + tqinvalidate(); } @@ -1436,7 +1436,7 @@ void AreaSelection::moveBy(int dx, int dy) Area::moveBy( dx, dy ); - invalidate(); + tqinvalidate(); } TQString AreaSelection::typeString() const @@ -1474,7 +1474,7 @@ void AreaSelection::updateSelectionPoints() it.current()->updateSelectionPoints(); } - invalidate(); + tqinvalidate(); } @@ -1525,7 +1525,7 @@ void AreaSelection::setArea(const Area & copy) setAreaSelection(*selection); else { Area::setArea(copy); - invalidate(); + tqinvalidate(); } } @@ -1541,14 +1541,14 @@ void AreaSelection::setAreaSelection(const AreaSelection & copy) it.current()->setArea(*it2.current()); Area::setArea(copy); - invalidate(); + tqinvalidate(); } void AreaSelection::setAreaList( const AreaList & areas ) { delete _areas; _areas = new AreaList(areas); - invalidate(); + tqinvalidate(); } void AreaSelection::setRect(const TQRect & r) @@ -1558,7 +1558,7 @@ void AreaSelection::setRect(const TQRect & r) _areas->getFirst()->setRect(r); } - invalidate(); + tqinvalidate(); _rect=rect(); updateSelectionPoints(); } @@ -1586,7 +1586,7 @@ int AreaSelection::addCoord(const TQPoint & p) if ( _areas->count()==1 ) { return _areas->getFirst()->addCoord(p); - invalidate(); + tqinvalidate(); } return 0; @@ -1597,7 +1597,7 @@ void AreaSelection::insertCoord(int pos, const TQPoint & p) if ( _areas->count()==1 ) { _areas->getFirst()->insertCoord(pos, p); - invalidate(); + tqinvalidate(); } } @@ -1606,7 +1606,7 @@ void AreaSelection::removeCoord(int pos) if ( _areas->count()==1 ) { _areas->getFirst()->removeCoord(pos); - invalidate(); + tqinvalidate(); } } @@ -1617,7 +1617,7 @@ bool AreaSelection::removeSelectionPoint(TQRect * r) if ( _areas->count()==1 ) { result = _areas->getFirst()->removeSelectionPoint(r); - invalidate(); + tqinvalidate(); } return result; @@ -1639,7 +1639,7 @@ void AreaSelection::moveCoord(int pos,const TQPoint & p) if ( _areas->count()==1 ) { _areas->getFirst()->moveCoord(pos,p); - invalidate(); + tqinvalidate(); } } @@ -1648,7 +1648,7 @@ void AreaSelection::highlightSelectionPoint(int i) if ( _areas->count()==1 ) { _areas->getFirst()->highlightSelectionPoint(i); - invalidate(); + tqinvalidate(); } } diff --git a/kimagemapeditor/kimearea.h b/kimagemapeditor/kimearea.h index 0c554754..3274a322 100644 --- a/kimagemapeditor/kimearea.h +++ b/kimagemapeditor/kimearea.h @@ -367,7 +367,7 @@ class AreaSelection : public Area { bool allAreasWithin(const TQRect & r) const; // makes the cache invalid - void invalidate(); + void tqinvalidate(); private : AreaList *_areas; @@ -382,7 +382,7 @@ class AreaSelection : public Area { }; -inline void AreaSelection::invalidate() { +inline void AreaSelection::tqinvalidate() { _selectionCacheValid=false; _rectCacheValid=false; } diff --git a/kimagemapeditor/kimecommands.cpp b/kimagemapeditor/kimecommands.cpp index 975001d9..817d8b7d 100644 --- a/kimagemapeditor/kimecommands.cpp +++ b/kimagemapeditor/kimecommands.cpp @@ -30,7 +30,7 @@ KCommand #else KNamedCommand #endif - (i18n( "Cut %1" ).arg( a.typeString() )) + (i18n( "Cut %1" ).tqarg( a.typeString() )) { _document=document; _cutAreaSelection=new AreaSelection(); @@ -74,7 +74,7 @@ void CutCommand::unexecute() DeleteCommand::DeleteCommand(KImageMapEditor * document, const AreaSelection & a) : CutCommand(document,a) { - setName(i18n( "Delete %1" ).arg( a.typeString() )); + setName(i18n( "Delete %1" ).tqarg( a.typeString() )); } PasteCommand::PasteCommand(KImageMapEditor *document, const AreaSelection & a) @@ -84,7 +84,7 @@ KCommand #else KNamedCommand #endif - (i18n( "Paste %1" ).arg( a.typeString() )) + (i18n( "Paste %1" ).tqarg( a.typeString() )) { _document=document; _pasteAreaSelection=new AreaSelection(); @@ -129,7 +129,7 @@ KCommand #else KNamedCommand #endif -(i18n( "Move %1" ).arg( a->typeString() )) +(i18n( "Move %1" ).tqarg( a->typeString() )) { _document=document; _areaSelection=new AreaSelection(); @@ -155,7 +155,7 @@ void MoveCommand::execute() if (!_areaSelection->allAreasWithin(_document->getDrawZone()->getImageRect())) _areaSelection->moveTo( _oldPoint.x(), _oldPoint.y() ); - _document->selected()->invalidate(); + _document->selected()->tqinvalidate(); _document->slotAreaChanged( tempArea ); @@ -174,7 +174,7 @@ void MoveCommand::unexecute() _areaSelection->moveTo( _oldPoint.x(), _oldPoint.y() ); _areaSelection->setMoving(false); - _document->selected()->invalidate(); + _document->selected()->tqinvalidate(); _document->slotAreaChanged( tempArea ); _document->slotAreaChanged( _areaSelection ); @@ -191,7 +191,7 @@ KCommand #else KNamedCommand #endif -(i18n( "Resize %1" ).arg( a->typeString() )) +(i18n( "Resize %1" ).tqarg( a->typeString() )) { _areaSelection=new AreaSelection(); _areaSelection->setAreaList( a->getAreaList() ); @@ -238,7 +238,7 @@ KCommand #else KNamedCommand #endif -(i18n( "Add point to %1" ).arg( a->typeString() )) +(i18n( "Add point to %1" ).tqarg( a->typeString() )) { if (a->type()!=Area::Polygon) { @@ -287,7 +287,7 @@ KCommand #else KNamedCommand #endif -(i18n( "Remove point from %1" ).arg( a->typeString() )) +(i18n( "Remove point from %1" ).tqarg( a->typeString() )) { if (a->type()!=Area::Polygon) { @@ -340,7 +340,7 @@ KCommand #else KNamedCommand #endif -(i18n( "Create %1" ).arg( area->typeString() )) +(i18n( "Create %1" ).tqarg( area->typeString() )) { _document=document; _area=area; diff --git a/kimagemapeditor/kimedialogs.cpp b/kimagemapeditor/kimedialogs.cpp index f825d6dc..c2e50c7c 100644 --- a/kimagemapeditor/kimedialogs.cpp +++ b/kimagemapeditor/kimedialogs.cpp @@ -19,7 +19,7 @@ //#include #include #include -#include +#include #include #include #include @@ -69,53 +69,53 @@ CoordsEdit::~CoordsEdit() RectCoordsEdit::RectCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - TQGridLayout *layout= new TQGridLayout(this,5,2,5,5); + TQGridLayout *tqlayout= new TQGridLayout(this,5,2,5,5); topXSpin = new TQSpinBox(this); topXSpin->setMaxValue(INT_MAX); topXSpin->setMinValue(0); topXSpin->setValue(a->rect().left()); - layout->addWidget(topXSpin,0,1); + tqlayout->addWidget(topXSpin,0,1); connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); TQLabel *lbl= new TQLabel(i18n("Top &X:"),this); lbl->setBuddy(topXSpin); - layout->addWidget(lbl,0,0); + tqlayout->addWidget(lbl,0,0); topYSpin = new TQSpinBox(this); topYSpin->setMaxValue(INT_MAX); topYSpin->setMinValue(0); topYSpin->setValue(a->rect().top()); - layout->addWidget(topYSpin,1,1); + tqlayout->addWidget(topYSpin,1,1); connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Top &Y:"),this); lbl->setBuddy(topYSpin); - layout->addWidget(lbl,1,0); + tqlayout->addWidget(lbl,1,0); widthSpin = new TQSpinBox(this); widthSpin->setMaxValue(INT_MAX); widthSpin->setMinValue(0); widthSpin->setValue(a->rect().width()); - layout->addWidget(widthSpin,2,1); + tqlayout->addWidget(widthSpin,2,1); connect( widthSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("&Width:"),this); lbl->setBuddy(widthSpin); - layout->addWidget(lbl,2,0); + tqlayout->addWidget(lbl,2,0); heightSpin = new TQSpinBox(this); heightSpin->setMaxValue(INT_MAX); heightSpin->setMinValue(0); heightSpin->setValue(a->rect().height()); - layout->addWidget(heightSpin,3,1); + tqlayout->addWidget(heightSpin,3,1); connect( heightSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Hei&ght:"),this); lbl->setBuddy(heightSpin); - layout->addWidget(lbl,3,0); + tqlayout->addWidget(lbl,3,0); - layout->setRowStretch(4,10); + tqlayout->setRowStretch(4,10); } void RectCoordsEdit::applyChanges() { @@ -130,44 +130,44 @@ void RectCoordsEdit::applyChanges() { CircleCoordsEdit::CircleCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - TQGridLayout *layout= new TQGridLayout(this,4,2,5,5); + TQGridLayout *tqlayout= new TQGridLayout(this,4,2,5,5); centerXSpin = new TQSpinBox(this); centerXSpin->setMaxValue(INT_MAX); centerXSpin->setMinValue(0); centerXSpin->setValue(a->rect().center().x()); - layout->addWidget(centerXSpin,0,1); + tqlayout->addWidget(centerXSpin,0,1); connect( centerXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); TQLabel *lbl= new TQLabel(i18n("Center &X:"),this); lbl->setBuddy(centerXSpin); - layout->addWidget(lbl,0,0); + tqlayout->addWidget(lbl,0,0); centerYSpin = new TQSpinBox(this); centerYSpin->setMaxValue(INT_MAX); centerYSpin->setMinValue(0); centerYSpin->setValue(a->rect().center().y()); - layout->addWidget(centerYSpin,1,1); + tqlayout->addWidget(centerYSpin,1,1); connect( centerYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Center &Y:"),this); lbl->setBuddy(centerYSpin); - layout->addWidget(lbl,1,0); + tqlayout->addWidget(lbl,1,0); radiusSpin = new TQSpinBox(this); radiusSpin->setMaxValue(INT_MAX); radiusSpin->setMinValue(0); radiusSpin->setValue(a->rect().width()/2); - layout->addWidget(radiusSpin,2,1); + tqlayout->addWidget(radiusSpin,2,1); connect( radiusSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("&Radius:"),this); lbl->setBuddy(radiusSpin); - layout->addWidget(lbl,2,0); + tqlayout->addWidget(lbl,2,0); - layout->setRowStretch(3,10); + tqlayout->setRowStretch(3,10); } @@ -184,7 +184,7 @@ PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { if (!a) return; - TQVBoxLayout *layout= new TQVBoxLayout(this); + TQVBoxLayout *tqlayout= new TQVBoxLayout(this); int numPoints=a->coords()->count(); coordsTable= new TQTable(numPoints,2,this); coordsTable->horizontalHeader()->setLabel(0,"X"); @@ -205,15 +205,15 @@ PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a) // coordsTable->setMaximumHeight(400); // coordsTable->resizeContents(100,100); coordsTable->resize(coordsTable->width(),100); - layout->addWidget(coordsTable); - layout->setStretchFactor(coordsTable,-1); + tqlayout->addWidget(coordsTable); + tqlayout->setStretchFactor(coordsTable,-1); TQHBox *hbox= new TQHBox(this); TQPushButton *addBtn=new TQPushButton(i18n("Add"),hbox); connect( addBtn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotAddPoint())); TQPushButton *removeBtn=new TQPushButton(i18n("Remove"),hbox); connect( removeBtn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotRemovePoint())); - layout->addWidget(hbox); + tqlayout->addWidget(hbox); slotHighlightPoint(1); } @@ -277,29 +277,29 @@ void PolyCoordsEdit::applyChanges() { SelectionCoordsEdit::SelectionCoordsEdit(TQWidget *parent, Area* a) : CoordsEdit(parent,a) { - TQGridLayout *layout= new TQGridLayout(this,2,2); + TQGridLayout *tqlayout= new TQGridLayout(this,2,2); topXSpin = new TQSpinBox(this); topXSpin->setMaxValue(INT_MAX); topXSpin->setMinValue(0); topXSpin->setValue(a->rect().left()); - layout->addWidget(topXSpin,0,1); + tqlayout->addWidget(topXSpin,0,1); connect( topXSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); TQLabel *lbl= new TQLabel(i18n("Top &X"),this); lbl->setBuddy(topXSpin); - layout->addWidget(lbl,0,0); + tqlayout->addWidget(lbl,0,0); topYSpin = new TQSpinBox(this); topYSpin->setMaxValue(INT_MAX); topYSpin->setMinValue(0); topYSpin->setValue(a->rect().top()); - layout->addWidget(topYSpin,1,1); + tqlayout->addWidget(topYSpin,1,1); connect( topYSpin, TQT_SIGNAL(valueChanged(const TQString &)), this, TQT_SLOT(slotTriggerUpdate())); lbl= new TQLabel(i18n("Top &Y"),this); lbl->setBuddy(topYSpin); - layout->addWidget(lbl,1,0); + tqlayout->addWidget(lbl,1,0); } void SelectionCoordsEdit::applyChanges() { @@ -308,13 +308,13 @@ void SelectionCoordsEdit::applyChanges() { -TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name) +TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *tqlayout, int y, const TQString & value, const TQString & name) { TQLineEdit* edit=new TQLineEdit(value,parent); - layout->addWidget(edit,y,2); + tqlayout->addWidget(edit,y,2); TQLabel* lbl=new TQLabel(name,parent); lbl->setBuddy(edit); - layout->addWidget(lbl,y,1); + tqlayout->addWidget(lbl,y,1); return edit; } @@ -322,7 +322,7 @@ TQLineEdit* AreaDialog::createLineEdit(TQWidget* parent, TQGridLayout *layout, i TQWidget* AreaDialog::createGeneralPage() { TQFrame* page = new TQFrame(this); - TQGridLayout* layout = new TQGridLayout(page,5,2,5,5); + TQGridLayout* tqlayout = new TQGridLayout(page,5,2,5,5); TQHBox *hbox= new TQHBox(page); @@ -332,25 +332,25 @@ TQWidget* AreaDialog::createGeneralPage() connect( btn, TQT_SIGNAL(pressed()), this, TQT_SLOT(slotChooseHref())); hbox->setMinimumHeight(hbox->height()); - layout->addWidget(hbox,0,2); + tqlayout->addWidget(hbox,0,2); TQLabel *lbl=new TQLabel(i18n( "&HREF:" ),page); lbl->setBuddy(hrefEdit); - layout->addWidget(lbl,0,1); + tqlayout->addWidget(lbl,0,1); - altEdit = createLineEdit(page,layout,1,area->attribute("alt"),i18n("Alt. &Text:")); - targetEdit = createLineEdit(page,layout,2,area->attribute("target"),i18n("Tar&get:")); - titleEdit = createLineEdit(page,layout,3,area->attribute("title"),i18n("Tit&le:")); + altEdit = createLineEdit(page,tqlayout,1,area->attribute("alt"),i18n("Alt. &Text:")); + targetEdit = createLineEdit(page,tqlayout,2,area->attribute("target"),i18n("Tar&get:")); + titleEdit = createLineEdit(page,tqlayout,3,area->attribute("title"),i18n("Tit&le:")); if (area->type()==Area::Default) { defaultAreaChk = new TQCheckBox(i18n("Enable default map"),page); if (area->finished()) defaultAreaChk->setChecked(true); - layout->addWidget(defaultAreaChk,3,2); + tqlayout->addWidget(defaultAreaChk,3,2); } - layout->setRowStretch(4,10); + tqlayout->setRowStretch(4,10); return page; } @@ -358,11 +358,11 @@ TQWidget* AreaDialog::createGeneralPage() TQWidget* AreaDialog::createCoordsPage() { TQFrame* page = new TQFrame(this); - TQVBoxLayout *layout = new TQVBoxLayout(page); - layout->setMargin(5); + TQVBoxLayout *tqlayout = new TQVBoxLayout(page); + tqlayout->setMargin(5); coordsEdit = createCoordsEdit(page,area); - layout->addWidget(coordsEdit); + tqlayout->addWidget(coordsEdit); connect( coordsEdit, TQT_SIGNAL(update()), this, TQT_SLOT(slotUpdateArea())); return page; @@ -371,17 +371,17 @@ TQWidget* AreaDialog::createCoordsPage() TQWidget* AreaDialog::createJavascriptPage() { TQFrame* page = new TQFrame(this); - TQGridLayout* layout = new TQGridLayout(page,8,2,5,5); + TQGridLayout* tqlayout = new TQGridLayout(page,8,2,5,5); - onClickEdit = createLineEdit(page,layout,0,area->attribute("onClick"),i18n("OnClick:")); - onDblClickEdit = createLineEdit(page,layout,1,area->attribute("onDblClick"),i18n("OnDblClick:")); - onMouseDownEdit = createLineEdit(page,layout,2,area->attribute("onMouseDown"),i18n("OnMouseDown:")); - onMouseUpEdit = createLineEdit(page,layout,3,area->attribute("onMouseUp"),i18n("OnMouseUp:")); - onMouseOverEdit = createLineEdit(page,layout,4,area->attribute("onMouseOver"),i18n("OnMouseOver:")); - onMouseMoveEdit = createLineEdit(page,layout,5,area->attribute("onMouseMove"),i18n("OnMouseMove:")); - onMouseOutEdit = createLineEdit(page,layout,6,area->attribute("onMouseOut"),i18n("OnMouseOut:")); + onClickEdit = createLineEdit(page,tqlayout,0,area->attribute("onClick"),i18n("OnClick:")); + onDblClickEdit = createLineEdit(page,tqlayout,1,area->attribute("onDblClick"),i18n("OnDblClick:")); + onMouseDownEdit = createLineEdit(page,tqlayout,2,area->attribute("onMouseDown"),i18n("OnMouseDown:")); + onMouseUpEdit = createLineEdit(page,tqlayout,3,area->attribute("onMouseUp"),i18n("OnMouseUp:")); + onMouseOverEdit = createLineEdit(page,tqlayout,4,area->attribute("onMouseOver"),i18n("OnMouseOver:")); + onMouseMoveEdit = createLineEdit(page,tqlayout,5,area->attribute("onMouseMove"),i18n("OnMouseMove:")); + onMouseOutEdit = createLineEdit(page,tqlayout,6,area->attribute("onMouseOut"),i18n("OnMouseOut:")); - layout->setRowStretch(7,10); + tqlayout->setRowStretch(7,10); return page; @@ -423,44 +423,44 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) setCaption(i18n("Area Tag Editor")); area=a; - TQString shape="Default"; + TQString tqshape="Default"; areaCopy= a->clone(); oldArea= new Area(); oldArea->setRect( a->rect() ); switch (a->type()) { - case Area::Rectangle : shape=i18n("Rectangle");break; - case Area::Circle : shape=i18n("Circle");break; - case Area::Polygon : shape=i18n("Polygon");break; - case Area::Selection : shape=i18n("Selection");break; + case Area::Rectangle : tqshape=i18n("Rectangle");break; + case Area::Circle : tqshape=i18n("Circle");break; + case Area::Polygon : tqshape=i18n("Polygon");break; + case Area::Selection : tqshape=i18n("Selection");break; default : break; } // To get a margin around everything - TQVBoxLayout *layout = new TQVBoxLayout(this); + TQVBoxLayout *tqlayout = new TQVBoxLayout(this); - layout->setMargin(5); + tqlayout->setMargin(5); - TQLabel *lbl = new TQLabel(""+shape+"",this); + TQLabel *lbl = new TQLabel(""+tqshape+"",this); lbl->setTextFormat(TQt::RichText); - layout->addWidget(lbl); + tqlayout->addWidget(lbl); TQFrame *line = new TQFrame(this); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - layout->addWidget(line); + tqlayout->addWidget(line); TQTabWidget *tab = new TQTabWidget(this); - layout->addWidget(tab); + tqlayout->addWidget(tab); tab->addTab(createGeneralPage(),i18n("&General")); if (a->type()==Area::Default) { - shape=i18n("Default"); + tqshape=i18n("Default"); } else tab->addTab(createCoordsPage(),i18n("Coor&dinates")); @@ -470,9 +470,9 @@ AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a) line = new TQFrame(this); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - layout->addWidget(line); + tqlayout->addWidget(line); - layout->addWidget(createButtonBar()); + tqlayout->addWidget(createButtonBar()); setMinimumHeight(360); setMinimumWidth(327); @@ -580,17 +580,17 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList *_ TQWidget *page=new TQWidget(this); setMainWidget(page); setCaption(baseUrl.fileName()); - TQVBoxLayout *layout = new TQVBoxLayout(page,5,5); + TQVBoxLayout *tqlayout = new TQVBoxLayout(page,5,5); TQLabel *lbl= new TQLabel(i18n("Select an image and/or a map that you want to edit"),page); lbl->setFont(TQFont("Sans Serif",12, TQFont::Bold)); - layout->addWidget(lbl); + tqlayout->addWidget(lbl); TQFrame *line= new TQFrame(page); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - layout->addWidget(line,0); + tqlayout->addWidget(line,0); - TQGridLayout *gridLayout= new TQGridLayout(layout,2,3,5); + TQGridLayout *gridLayout= new TQGridLayout(tqlayout,2,3,5); gridLayout->setRowStretch(0,0); gridLayout->setRowStretch(1,100); lbl=new TQLabel(i18n("&Maps"),page); @@ -602,7 +602,7 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList *_ line= new TQFrame(page); line->setFrameStyle(TQFrame::VLine | TQFrame::Sunken); line->setFixedWidth(10); -// line->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); +// line->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); gridLayout->addWidget(line,1,1); lbl=new TQLabel(i18n("Image Preview"),page); @@ -610,7 +610,7 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList *_ imagePreview= new TQLabel(page); imagePreview->setFixedSize(310,210); - imagePreview->setSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); + imagePreview->tqsetSizePolicy(TQSizePolicy(TQSizePolicy::Fixed, TQSizePolicy::Expanding)); imagePreview->setFrameStyle(TQLabel::Panel | TQLabel::Sunken); imagePreview->setIndent(5); imagePreview->setBackgroundColor(TQColor("white")); @@ -619,12 +619,12 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList *_ // lbl= new TQLabel(i18n("&Maps"),page); // lbl->setBuddy(mapListBox); gridLayout->addWidget(imagePreview,1,2); -// layout->addLayout(gridLayout,1); +// tqlayout->addLayout(gridLayout,1); line= new TQFrame(page); line->setFrameStyle(TQFrame::HLine | TQFrame::Sunken); line->setFixedHeight(10); - layout->addWidget(line,0); + tqlayout->addWidget(line,0); if (maps->isEmpty()) { @@ -669,8 +669,8 @@ void ImageMapChooseDialog::initImageListTable(TQWidget* parent) { TQLabel *lbl= new TQLabel(i18n("&Images"),parent); lbl->setBuddy(imageListTable); - parent->layout()->add(lbl); - parent->layout()->add(imageListTable); + parent->tqlayout()->add(lbl); + parent->tqlayout()->add(imageListTable); if (images->isEmpty()) return; @@ -731,7 +731,7 @@ void ImageMapChooseDialog::slotImageChanged() pix2.convertFromImage(pix); imagePreview->setPixmap(pix2); -// imagePreview->repaint(); +// imagePreview->tqrepaint(); } void ImageMapChooseDialog::selectImageWithUsemap(const TQString & usemap) { @@ -866,8 +866,8 @@ HTMLPreviewDialog::~HTMLPreviewDialog() { void HTMLPreviewDialog::show() { KDialogBase::show(); htmlPart->openURL(KURL( tempFile->name() )); -// htmlView->layout(); -// htmlView->repaint(); +// htmlView->tqlayout(); +// htmlView->tqrepaint(); resize(800,600); } diff --git a/kimagemapeditor/kimedialogs.h b/kimagemapeditor/kimedialogs.h index f3a245cd..2f4000a3 100644 --- a/kimagemapeditor/kimedialogs.h +++ b/kimagemapeditor/kimedialogs.h @@ -137,7 +137,7 @@ class AreaDialog : public KDialog { void slotChooseHref(); void slotUpdateArea(); - TQLineEdit* createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name); + TQLineEdit* createLineEdit(TQWidget* parent, TQGridLayout *tqlayout, int y, const TQString & value, const TQString & name); TQWidget* createGeneralPage(); TQWidget* createCoordsPage(); TQWidget* createJavascriptPage(); diff --git a/kimagemapeditor/kimeshell.cpp b/kimagemapeditor/kimeshell.cpp index 6b0311a9..70e97757 100644 --- a/kimagemapeditor/kimeshell.cpp +++ b/kimagemapeditor/kimeshell.cpp @@ -45,7 +45,7 @@ KimeShell::KimeShell(const char *name ) KDockWidget* mainDock; mainDock = createDockWidget( "MainDockWidget", 0L, 0L, "main_dock_widget"); TQWidget *w = new TQHBox( mainDock ); -// TQLayout* layout = new TQGridLayout( mainDock ); +// TQLayout* tqlayout = new TQGridLayout( mainDock ); mainDock->setWidget( w ); // allow others to dock to the 4 sides @@ -71,7 +71,7 @@ KimeShell::KimeShell(const char *name ) //setCentralWidget(part->widget()); if (!initialGeometrySet()) - resize( TQSize(725, 525).expandedTo(minimumSizeHint())); + resize( TQSize(725, 525).expandedTo(tqminimumSizeHint())); connect( m_part, TQT_SIGNAL(setStatusBarText(const TQString &)), this, TQT_SLOT(slotSetStatusBarText ( const TQString & ))); -- cgit v1.2.1