summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /kimagemapeditor
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kimagemapeditor')
-rw-r--r--kimagemapeditor/arealistview.cpp4
-rw-r--r--kimagemapeditor/arealistview.h5
-rw-r--r--kimagemapeditor/drawzone.cpp84
-rw-r--r--kimagemapeditor/drawzone.h8
-rw-r--r--kimagemapeditor/imagemap.cpp38
-rw-r--r--kimagemapeditor/imagemap.h4
-rw-r--r--kimagemapeditor/imageslistview.cpp16
-rw-r--r--kimagemapeditor/imageslistview.h5
-rw-r--r--kimagemapeditor/kimagemapeditor.cpp242
-rw-r--r--kimagemapeditor/kimagemapeditor.h9
-rw-r--r--kimagemapeditor/kimearea.cpp218
-rw-r--r--kimagemapeditor/kimearea.h14
-rw-r--r--kimagemapeditor/kimecommands.cpp28
-rw-r--r--kimagemapeditor/kimedialogs.cpp238
-rw-r--r--kimagemapeditor/kimedialogs.h38
-rw-r--r--kimagemapeditor/kimeshell.cpp20
-rw-r--r--kimagemapeditor/kimeshell.h1
-rw-r--r--kimagemapeditor/mapslistview.cpp12
-rw-r--r--kimagemapeditor/mapslistview.h7
-rw-r--r--kimagemapeditor/qextfileinfo.cpp84
-rw-r--r--kimagemapeditor/qextfileinfo.h17
21 files changed, 552 insertions, 540 deletions
diff --git a/kimagemapeditor/arealistview.cpp b/kimagemapeditor/arealistview.cpp
index 203a741f..a92eb567 100644
--- a/kimagemapeditor/arealistview.cpp
+++ b/kimagemapeditor/arealistview.cpp
@@ -31,8 +31,8 @@
#include "arealistview.h"
-AreaListView::AreaListView(TQWidget *parent, const char *name)
- : TQVBox(parent, name)
+AreaListView::AreaListView(TQWidget *tqparent, const char *name)
+ : TQVBox(tqparent, name)
{
listView = new KListView(this);
listView->addColumn(i18n("Areas"));
diff --git a/kimagemapeditor/arealistview.h b/kimagemapeditor/arealistview.h
index 6e09aaef..8b640828 100644
--- a/kimagemapeditor/arealistview.h
+++ b/kimagemapeditor/arealistview.h
@@ -30,12 +30,13 @@ class Area;
* It shows all Areas of the current map.
* Jan Schaefer
**/
-class AreaListView : public QVBox
+class AreaListView : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- AreaListView(TQWidget *parent, const char *name);
+ AreaListView(TQWidget *tqparent, const char *name);
~AreaListView();
KListView* listView;
diff --git a/kimagemapeditor/drawzone.cpp b/kimagemapeditor/drawzone.cpp
index 60b6fe9f..152f5300 100644
--- a/kimagemapeditor/drawzone.cpp
+++ b/kimagemapeditor/drawzone.cpp
@@ -37,8 +37,8 @@
#include "kimecommon.h"
-DrawZone::DrawZone(TQWidget *parent,KImageMapEditor* _imageMapEditor)
- : TQScrollView(parent)
+DrawZone::DrawZone(TQWidget *tqparent,KImageMapEditor* _imageMapEditor)
+ : TQScrollView(tqparent)
{
imageMapEditor=_imageMapEditor;
// setPicture(TQImage());
@@ -175,7 +175,7 @@ void DrawZone::setZoom(double z)
pix.convertFromImage(image);
// if the picture has transparent areas,
// fill them with Gimp like background
- if (pix.mask()) {
+ if (pix.tqmask()) {
TQPixmap backPix(32,32);
TQPainter p2(&backPix);
p2.fillRect(0,0,32,32,TQColor(156,149,156));
@@ -189,7 +189,7 @@ void DrawZone::setZoom(double z)
p.flush();
resizeContents(visibleWidth()>imageRect.width() ? visibleWidth() : imageRect.width(),
visibleHeight()>imageRect.height() ? visibleHeight() : imageRect.height());
- repaintContents(0,0,contentsWidth(),contentsHeight(),true);
+ tqrepaintContents(0,0,contentsWidth(),contentsHeight(),true);
}
TQPoint DrawZone::translateFromZoom(const TQPoint & p) const {
@@ -238,7 +238,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
drawStart=e->pos();
// Check if it's on picture if not
// move it to the picture's border
- if (!imageRect.contains(drawStart)) {
+ if (!imageRect.tqcontains(drawStart)) {
if (drawStart.x()>imageRect.right())
drawStart.setX(imageRect.right());
if (drawStart.x()<imageRect.left())
@@ -262,7 +262,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
}
if ( currentAction==None ) {
- if (e->button()==RightButton)
+ if (e->button()==Qt::RightButton)
{
if ( (currentArea=imageMapEditor->onArea(drawStart)) )
{
@@ -278,7 +278,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
}
else
- if (e->button()==MidButton) {
+ if (e->button()==Qt::MidButton) {
contentsMouseDoubleClickEvent(e);
}
else // LeftClick on selectionpoint
@@ -379,7 +379,7 @@ void DrawZone::contentsMousePressEvent(TQMouseEvent* e)
r=oldArea->selectionRect();
if (currentArea) {
r= r | currentArea->selectionRect();
- repaintContents(translateToZoom(r),false);
+ tqrepaintContents(translateToZoom(r),false);
}
@@ -393,7 +393,7 @@ void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) {
// Check if it's on picture if not
// move it to the picture's border
- if (!imageRect.contains(drawEnd)) {
+ if (!imageRect.tqcontains(drawEnd)) {
if (drawEnd.x()>imageRect.right())
drawEnd.setX(imageRect.right());
if (drawEnd.x()<imageRect.left())
@@ -419,8 +419,8 @@ void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) {
// and clicked on the first PolygonPoint or
// the right Button was pressed the Polygon is finished
if ((currentArea->selectionPoints()->count()>2)
- && (currentArea->selectionPoints()->first()->contains(drawEnd)
- || (e->button()==RightButton)))
+ && (currentArea->selectionPoints()->first()->tqcontains(drawEnd)
+ || (e->button()==Qt::RightButton)))
{
currentArea->setFinished(true);
currentAction=None;
@@ -501,7 +501,7 @@ void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) {
imageMapEditor->updateActionAccess();
imageMapEditor->updateSelection();
- repaintContents(imageRect,false);
+ tqrepaintContents(imageRect,false);
} else {
currentAction=None;
}
@@ -509,11 +509,11 @@ void DrawZone::contentsMouseReleaseEvent(TQMouseEvent *e) {
if (currentArea)
{
currentArea->setMoving(false);
- repaintArea(*currentArea);
+ tqrepaintArea(*currentArea);
}
delete oldArea;
oldArea=0L;
-// repaintContents(0,0,contentsWidth(),contentsHeight(),false);
+// tqrepaintContents(0,0,contentsWidth(),contentsHeight(),false);
imageMapEditor->slotUpdateSelectionCoords();
}
@@ -528,7 +528,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
// If outside the image
// set it to the border
- if (!imageRect.contains(drawCurrent)) {
+ if (!imageRect.tqcontains(drawCurrent)) {
if (drawCurrent.x()>imageRect.right())
drawCurrent.setX(imageRect.right());
if (drawCurrent.x()<imageRect.left())
@@ -545,12 +545,12 @@ 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());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords( currentArea->rect() );
} else
if (currentAction==DrawCircle) {
@@ -576,7 +576,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
currentArea->setRect(TQRect(drawStart,endPoint).normalize());
TQRect newRect=translateToZoom(currentArea->rect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords( currentArea->rect() );
} else
if ( currentAction==DrawPolygon ) {
@@ -584,14 +584,14 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
TQRect newRect=translateToZoom(currentArea->rect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
} else
if ( currentAction==DrawFreehand) {
TQRect oldRect=translateToZoom(currentArea->rect());
currentArea->insertCoord(currentArea->countSelectionPoints(), drawCurrent);
TQRect newRect=translateToZoom(currentArea->rect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
} else
if ( currentAction==MoveArea ) {
TQRect oldRect=translateToZoom(currentArea->selectionRect());
@@ -599,7 +599,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
TQRect newRect=translateToZoom(currentArea->selectionRect());
TQRect r=oldRect | newRect;
currentArea->setMoving(true);
- repaintContents(r,false);
+ tqrepaintContents(r,false);
drawStart=drawCurrent;
imageMapEditor->slotUpdateSelectionCoords();
} else
@@ -608,7 +608,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
TQRect newRect=translateToZoom(currentArea->selectionRect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords();
} else
if (currentAction==DoSelect) {
@@ -629,27 +629,27 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
imageMapEditor->deselectWithoutUpdate( it.current() );
}
*/
- // We don't have to repaint the hole selection rectangle
- // only the borders have to be repainted.
+ // We don't have to tqrepaint the hole selection rectangle
+ // only the borders have to be tqrepainted.
// 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);
- repaintContents(lb,false);
- repaintContents(rb,false);
- repaintContents(tb,false);
- repaintContents(bb,false);
+ tqrepaintContents(lb,false);
+ tqrepaintContents(rb,false);
+ tqrepaintContents(tb,false);
+ tqrepaintContents(bb,false);
createBorderRectangles(translateToZoom(oldSelectionRect),lb,rb,tb,bb);
- repaintContents(lb,false);
- repaintContents(rb,false);
- repaintContents(tb,false);
- repaintContents(bb,false);
+ tqrepaintContents(lb,false);
+ tqrepaintContents(rb,false);
+ tqrepaintContents(tb,false);
+ tqrepaintContents(bb,false);
-// repaintContents(oldSelectionRect | r,false);
+// tqrepaintContents(oldSelectionRect | r,false);
oldSelectionRect = r;
-// repaintContents(translateToZoom(r),false);
+// tqrepaintContents(translateToZoom(r),false);
//+ imageMapEditor->updateSelection();
@@ -658,7 +658,7 @@ void DrawZone::contentsMouseMoveEvent(TQMouseEvent *e)
// TQRect r2(drawStart.x(),drawStart.y(),drawOld.x()-drawStart.x(),drawOld.y()-drawStart.y());
// r2 = r2.normalize();
// r = translateToZoom(r | r2);
-// repaintContents(r,false);
+// tqrepaintContents(r,false);
} else
if ( currentAction==None )
{
@@ -782,17 +782,17 @@ void DrawZone::cancelDrawing()
TQRect r = translateToZoom(currentArea->selectionRect());
delete currentArea;
currentArea = 0L;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords();
}
}
-void DrawZone::repaintArea(const Area & a) {
- repaintContents(translateToZoom(a.selectionRect()),false);
+void DrawZone::tqrepaintArea(const Area & a) {
+ tqrepaintContents(translateToZoom(a.selectionRect()),false);
}
-void DrawZone::repaintRect(const TQRect & r) {
- repaintContents(translateToZoom(r),false);
+void DrawZone::tqrepaintRect(const TQRect & r) {
+ tqrepaintContents(translateToZoom(r),false);
}
void DrawZone::drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph)
@@ -848,7 +848,7 @@ void DrawZone::drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph
if (currentAction == DoSelect )
{
TQPen pen = TQPen(TQColor("white"),1);
- p2.setRasterOp(Qt::XorROP);
+ p2.setRasterOp(TQt::XorROP);
pen.setStyle(Qt::DotLine);
p2.setPen(pen);
diff --git a/kimagemapeditor/drawzone.h b/kimagemapeditor/drawzone.h
index 58887288..f1b1d410 100644
--- a/kimagemapeditor/drawzone.h
+++ b/kimagemapeditor/drawzone.h
@@ -38,12 +38,12 @@ class Area;
class DrawZone : public TQScrollView {
public:
- DrawZone(TQWidget *parent,KImageMapEditor* _imageMapEditor);
+ DrawZone(TQWidget *tqparent,KImageMapEditor* _imageMapEditor);
~DrawZone();
TQImage picture() const;
- void repaintArea(const Area & a);
- void repaintRect(const TQRect & r);
+ void tqrepaintArea(const Area & a);
+ void tqrepaintRect(const TQRect & r);
void cancelDrawing();
void setPicture(const TQImage &_image);
@@ -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..070b54fa 100644
--- a/kimagemapeditor/imagemap.cpp
+++ b/kimagemapeditor/imagemap.cpp
@@ -28,8 +28,8 @@ int round(double d) {
return ((int) d)+1;
}
-ImageMap::ImageMap(TQWidget *parent,KImageMapEditor* _imageMapEditor)
- : TQScrollView(parent)
+ImageMap::ImageMap(TQWidget *tqparent,KImageMapEditor* _imageMapEditor)
+ : TQScrollView(tqparent)
{
imageMapEditor=_imageMapEditor;
// setPicture(TQImage());
@@ -63,7 +63,7 @@ void ImageMap::setZoom(double z) {
pix.convertFromImage(image);
// if the picture has transparent areas,
// fill them with Gimp like background
- if (pix.mask()) {
+ if (pix.tqmask()) {
TQPixmap backPix(32,32);
TQPainter p2(&backPix);
p2.fillRect(0,0,32,32,TQColor(156,149,156));
@@ -77,7 +77,7 @@ void ImageMap::setZoom(double z) {
p.flush();
resizeContents(visibleWidth()>imageRect.width() ? visibleWidth() : imageRect.width(),
visibleHeight()>imageRect.height() ? visibleHeight() : imageRect.height());
- repaintContents(0,0,contentsWidth(),contentsHeight(),true);
+ tqrepaintContents(0,0,contentsWidth(),contentsHeight(),true);
}
TQPoint ImageMap::translateFromZoom(const TQPoint & p) const {
@@ -107,7 +107,7 @@ void ImageMap::contentsMousePressEvent(TQMouseEvent* e) {
drawStart=e->pos();
// Check if it's on picture if not
// move it to the picture's border
- if (!imageRect.contains(drawStart)) {
+ if (!imageRect.tqcontains(drawStart)) {
if (drawStart.x()>imageRect.right())
drawStart.setX(imageRect.right());
if (drawStart.x()<imageRect.left())
@@ -172,7 +172,7 @@ void ImageMap::contentsMousePressEvent(TQMouseEvent* e) {
r=oldArea->selectionRect();
if (currentArea) {
r= r | currentArea->selectionRect();
- repaintContents(translateToZoom(r),false);
+ tqrepaintContents(translateToZoom(r),false);
}
}
@@ -182,7 +182,7 @@ void ImageMap::contentsMouseReleaseEvent(TQMouseEvent *e) {
// Check if it's on picture if not
// move it to the picture's border
- if (!imageRect.contains(drawEnd)) {
+ if (!imageRect.tqcontains(drawEnd)) {
if (drawEnd.x()>imageRect.right())
drawEnd.setX(imageRect.right());
if (drawEnd.x()<imageRect.left())
@@ -207,7 +207,7 @@ void ImageMap::contentsMouseReleaseEvent(TQMouseEvent *e) {
// and clicked on the first PolygonPoint or
// the right Button was pressed the Polygon is finished
if ((currentArea->selectionPoints()->count()>2)
- && (currentArea->selectionPoints()->first()->contains(drawEnd)
+ && (currentArea->selectionPoints()->first()->tqcontains(drawEnd)
|| (e->button()==RightButton)))
{
currentArea->setFinished(true);
@@ -233,8 +233,8 @@ void ImageMap::contentsMouseReleaseEvent(TQMouseEvent *e) {
imageMapEditor->slotUpdateSelectionCoords();
if (currentArea)
- repaintArea(*currentArea);
-// repaintContents(0,0,contentsWidth(),contentsHeight(),false);
+ tqrepaintArea(*currentArea);
+// tqrepaintContents(0,0,contentsWidth(),contentsHeight(),false);
}
@@ -243,7 +243,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) {
// If outside the image
// set it to the border
- if (!imageRect.contains(drawCurrent)) {
+ if (!imageRect.tqcontains(drawCurrent)) {
if (drawCurrent.x()>imageRect.right())
drawCurrent.setX(imageRect.right());
if (drawCurrent.x()<imageRect.left())
@@ -259,12 +259,12 @@ 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());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords(currentArea->rect());
} else
if (currentAction==DrawCircle) {
@@ -272,7 +272,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) {
currentArea->setRect(TQRect(drawStart,drawCurrent).normalize());
TQRect newRect=translateToZoom(currentArea->rect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords(currentArea->rect());
} else
if ( currentAction==DrawPolygon ) {
@@ -280,7 +280,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) {
currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
TQRect newRect=translateToZoom(currentArea->rect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords(currentArea->rect());
} else
if ( currentAction==MoveArea ) {
@@ -288,7 +288,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) {
currentArea->moveBy((drawCurrent-drawStart).x(),(drawCurrent-drawStart).y());
TQRect newRect=translateToZoom(currentArea->selectionRect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
drawStart=drawCurrent;
imageMapEditor->slotUpdateSelectionCoords();
} else
@@ -297,7 +297,7 @@ void ImageMap::contentsMouseMoveEvent(TQMouseEvent *e) {
currentArea->moveSelectionPoint(currentSelectionPoint,drawCurrent);
TQRect newRect=translateToZoom(currentArea->selectionRect());
TQRect r=oldRect | newRect;
- repaintContents(r,false);
+ tqrepaintContents(r,false);
imageMapEditor->slotUpdateSelectionCoords();
}
imageMapEditor->slotChangeStatusCoords(drawCurrent.x(),drawCurrent.y());
@@ -321,8 +321,8 @@ void ImageMap::resizeEvent(TQResizeEvent* e) {
}
-void ImageMap::repaintArea(const Area & a) {
- repaintContents(translateToZoom(a.selectionRect()),false);
+void ImageMap::tqrepaintArea(const Area & a) {
+ tqrepaintContents(translateToZoom(a.selectionRect()),false);
}
void ImageMap::drawContents(TQPainter* p,int clipx,int clipy,int clipw,int cliph) {
diff --git a/kimagemapeditor/imagemap.h b/kimagemapeditor/imagemap.h
index fe14c9d4..5f24560e 100644
--- a/kimagemapeditor/imagemap.h
+++ b/kimagemapeditor/imagemap.h
@@ -51,11 +51,11 @@ private:
KImageMapEditor *imageMapEditor;
double _zoom;
public:
- ImageMap(TQWidget *parent,KImageMapEditor* _imageMapEditor);
+ ImageMap(TQWidget *tqparent,KImageMapEditor* _imageMapEditor);
~ImageMap();
void setZoom(double z);
void setPicture(const TQImage &_image);
- void repaintArea(const Area & a);
+ void tqrepaintArea(const Area & a);
TQImage picture() const;
TQPoint translateFromZoom(const TQPoint & p) const;
TQPoint translateToZoom(const TQPoint & p) const;
diff --git a/kimagemapeditor/imageslistview.cpp b/kimagemapeditor/imageslistview.cpp
index 7db15e1e..b7d50b26 100644
--- a/kimagemapeditor/imageslistview.cpp
+++ b/kimagemapeditor/imageslistview.cpp
@@ -26,8 +26,8 @@
// locale
#include "imageslistview.h"
-ImagesListViewItem::ImagesListViewItem(ImagesListView* parent, ImageTag* tag)
- : TQListViewItem(parent)
+ImagesListViewItem::ImagesListViewItem(ImagesListView* tqparent, ImageTag* tag)
+ : TQListViewItem(tqparent)
{
_imageTag = tag;
update();
@@ -37,10 +37,10 @@ ImagesListViewItem::ImagesListViewItem(ImagesListView* parent, ImageTag* tag)
void ImagesListViewItem::update() {
TQString src="";
TQString usemap="";
- if (_imageTag->find("src"))
- src=*_imageTag->find("src");
- if (_imageTag->find("usemap"))
- usemap=*_imageTag->find("usemap");
+ if (_imageTag->tqfind("src"))
+ src=*_imageTag->tqfind("src");
+ if (_imageTag->tqfind("usemap"))
+ usemap=*_imageTag->tqfind("usemap");
setText(0,src);
setText(1,usemap);
@@ -51,8 +51,8 @@ ImageTag* ImagesListViewItem::imageTag() {
}
-ImagesListView::ImagesListView(TQWidget *parent, const char *name)
- : KListView(parent, name)
+ImagesListView::ImagesListView(TQWidget *tqparent, const char *name)
+ : KListView(tqparent, name)
{
addColumn(i18n("Images"));
addColumn(i18n("Usemap"));
diff --git a/kimagemapeditor/imageslistview.h b/kimagemapeditor/imageslistview.h
index ede6a87b..5155bfc4 100644
--- a/kimagemapeditor/imageslistview.h
+++ b/kimagemapeditor/imageslistview.h
@@ -25,7 +25,7 @@
class ImagesListView;
-class ImagesListViewItem : public QListViewItem
+class ImagesListViewItem : public TQListViewItem
{
public:
ImagesListViewItem(ImagesListView*, ImageTag*);
@@ -47,9 +47,10 @@ class ImagesListViewItem : public QListViewItem
class ImagesListView : public KListView
{
Q_OBJECT
+ TQ_OBJECT
public:
- ImagesListView(TQWidget *parent, const char *name);
+ ImagesListView(TQWidget *tqparent, const char *name);
virtual ~ImagesListView();
/**
diff --git a/kimagemapeditor/kimagemapeditor.cpp b/kimagemapeditor/kimagemapeditor.cpp
index 6a71f3a6..ba5183e0 100644
--- a/kimagemapeditor/kimagemapeditor.cpp
+++ b/kimagemapeditor/kimagemapeditor.cpp
@@ -84,9 +84,9 @@
typedef KParts::GenericFactory<KImageMapEditor> KimeFactory;
K_EXPORT_COMPONENT_FACTORY( libkimagemapeditor , KimeFactory )
-KImageMapEditor::KImageMapEditor(TQWidget *parentWidget, const char *,
- TQObject *parent, const char *name, const TQStringList & )
- : KParts::ReadWritePart(parent,name)
+KImageMapEditor::KImageMapEditor(TQWidget *tqparentWidget, const char *,
+ TQObject *tqparent, const char *name, const TQStringList & )
+ : KParts::ReadWritePart(tqparent,name)
{
setInstance( KimeFactory::instance() );
@@ -94,14 +94,14 @@ KImageMapEditor::KImageMapEditor(TQWidget *parentWidget, const char *,
// Test if the MainWindow can handle DockWindows, if so create DockWidgets
// instead of a Splitter
- mainDock = dynamic_cast<KDockMainWindow*>(parent) ;
+ mainDock = dynamic_cast<KDockMainWindow*>(tqparent) ;
TQSplitter * splitter = 0L;
tabWidget = 0L;
if (mainDock) {
// kdDebug() << "KImageMapEditor: We got a KDockMainWindow !" << endl;
- KDockWidget* parentDock = mainDock->getMainDockWidget();
+ KDockWidget* tqparentDock = mainDock->getMainDockWidget();
areaDock = mainDock->createDockWidget( "Areas", 0L, 0L, i18n("Areas"), i18n("Areas"));
mapsDock = mainDock->createDockWidget( "Maps", 0L, 0L, i18n("Maps"), i18n("Maps"));
imagesDock = mainDock->createDockWidget( "Images", 0L, 0L, i18n("Images"), i18n("Images"));
@@ -114,7 +114,7 @@ KImageMapEditor::KImageMapEditor(TQWidget *parentWidget, const char *,
mapsDock->setWidget(mapsListView);
imagesDock->setWidget(imagesListView);
- areaDock->manualDock( (KDockWidget*) parentDock, KDockWidget::DockLeft, 30);
+ areaDock->manualDock( (KDockWidget*) tqparentDock, KDockWidget::DockLeft, 30);
mapsDock->manualDock( (KDockWidget*) areaDock, KDockWidget::DockCenter);
imagesDock->manualDock( (KDockWidget*) mapsDock, KDockWidget::DockCenter);
@@ -125,7 +125,7 @@ KImageMapEditor::KImageMapEditor(TQWidget *parentWidget, const char *,
areaDock = 0L;
mapsDock = 0L;
imagesDock = 0L;
- splitter = new TQSplitter(parentWidget);
+ splitter = new TQSplitter(tqparentWidget);
tabWidget = new TQTabWidget(splitter);
areaListView = new AreaListView(tabWidget,"AreaListView");
mapsListView = new MapsListView(tabWidget, "MapsListView");
@@ -174,7 +174,7 @@ KImageMapEditor::KImageMapEditor(TQWidget *parentWidget, const char *,
splitter->setResizeMode(tabWidget,TQSplitter::KeepSize);
setWidget(splitter);
} else {
- drawZone = new DrawZone(parentWidget,this);
+ drawZone = new DrawZone(tqparentWidget,this);
setWidget(drawZone);
}
@@ -225,14 +225,14 @@ KImageMapEditor::~KImageMapEditor() {
MapTag::MapTag() {
modified = false;
- name = TQString::null;
+ name = TQString();
}
void KImageMapEditor::init()
{
_htmlContent.clear();
- _imageUrl = TQString::null;
- m_url = TQString::null;
+ _imageUrl = TQString();
+ m_url = TQString();
HtmlElement* el = new HtmlElement("<html>\n");
_htmlContent.append(el);
el = new HtmlElement("<head>\n");
@@ -333,7 +333,7 @@ void KImageMapEditor::setModified(bool modified)
else
save->setEnabled(false);
- // in any event, we want our parent to do it's thing
+ // in any event, we want our tqparent to do it's thing
ReadWritePart::setModified(modified);
}
@@ -396,7 +396,7 @@ void KImageMapEditor::slotConfigChanged()
}
updateAllAreas();
- drawZone->viewport()->repaint();
+ drawZone->viewport()->tqrepaint();
}
void KImageMapEditor::openLastURL(KConfig* config) {
@@ -414,7 +414,7 @@ void KImageMapEditor::openLastURL(KConfig* config) {
if ( openHTMLFile(lastURL, lastMap, lastImage) )
m_url = lastURL;
else
- m_url = TQString::null;
+ m_url = TQString();
}
}
@@ -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<TQPopupMenu *>(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();
}
@@ -844,7 +844,7 @@ TQImage KImageMapEditor::getBackgroundImage() {
// TQString filename = TQString("dropimage_")+KGlobal::locale()->language()+".png";
-// TQString path = TQString::null; //KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/"+filename ) + "kimagemapeditor/"+filename;
+// TQString path = TQString(); //KGlobal::dirs()->findResourceDir( "data", "kimagemapeditor/"+filename ) + "kimagemapeditor/"+filename;
// kdDebug() << "getBackgroundPic : loaded image : " << path << endl;
// if ( ! TQFileInfo(path).exists() ) {
@@ -863,7 +863,7 @@ TQImage KImageMapEditor::getBackgroundImage() {
font.setBold(true);
p.setFont( font );
- p.setRasterOp(Qt::CopyROP);
+ p.setRasterOp(TQt::CopyROP);
p.setPen(TQPen(TQColor(112,114,112),1));
// The translated string must be divided into
@@ -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
@@ -1015,7 +1015,7 @@ void KImageMapEditor::deleteArea( Area * area )
area->deleteListViewItem();
}
- drawZone->repaintRect(redrawRect);
+ drawZone->tqrepaintRect(redrawRect);
// Only to disable cut and copy actions
@@ -1037,7 +1037,7 @@ void KImageMapEditor::deleteSelected() {
}
- drawZone->repaintArea( *currentSelected );
+ drawZone->tqrepaintArea( *currentSelected );
// Only to disable cut and copy actions
if (areas->count()==0)
deselectAll();
@@ -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 {
@@ -1083,7 +1083,7 @@ void KImageMapEditor::select(Area* a)
currentSelected->add(a);
updateActionAccess();
slotUpdateSelectionCoords();
-// drawZone->repaintArea( *a);
+// drawZone->tqrepaintArea( *a);
}
@@ -1100,13 +1100,13 @@ void KImageMapEditor::slotSelectionChanged()
for ( ; it.current() != 0L; ++it)
{
- if ( it.current()->listViewItem()->isSelected() != (list.containsRef(it.current()) > 0) )
+ if ( it.current()->listViewItem()->isSelected() != (list.tqcontainsRef(it.current()) > 0) )
{
it.current()->listViewItem()->isSelected()
? select( it.current() )
: deselect( it.current() );
- drawZone->repaintArea( *it.current());
+ drawZone->tqrepaintArea( *it.current());
}
}
@@ -1122,7 +1122,7 @@ void KImageMapEditor::select( TQListViewItem* item)
if (it.current()->listViewItem() == item )
{
select( it.current() );
- drawZone->repaintArea( *it.current());
+ drawZone->tqrepaintArea( *it.current());
}
}
@@ -1162,7 +1162,7 @@ void KImageMapEditor::slotAreaChanged(Area *area)
area->listViewItem()->setPixmap(1,makeListViewPix(*area));
}
- drawZone->repaintArea(*area);
+ drawZone->tqrepaintArea(*area);
}
@@ -1170,7 +1170,7 @@ void KImageMapEditor::deselect(Area* a)
{
if (a) {
currentSelected->remove(a);
-// drawZone->repaintArea(*a);
+// drawZone->tqrepaintArea(*a);
updateActionAccess();
slotUpdateSelectionCoords();
}
@@ -1280,7 +1280,7 @@ void KImageMapEditor::updateUpDownBtn()
return;
}
// if the first Area is in the selection can't move up
- if (list.find( areas->getFirst() ) == -1)
+ if (list.tqfind( areas->getFirst() ) == -1)
{
forwardOneAction->setEnabled(true);
areaListView->upBtn->setEnabled(true);
@@ -1290,10 +1290,10 @@ void KImageMapEditor::updateUpDownBtn()
areaListView->upBtn->setEnabled(false);
}
- drawZone->repaintArea(*currentSelected);
+ drawZone->tqrepaintArea(*currentSelected);
// if the last Area is in the selection can't move down
- if (list.find( areas->getLast() ) == -1)
+ if (list.tqfind( areas->getLast() ) == -1)
{
backOneAction->setEnabled(true);
areaListView->downBtn->setEnabled(true);
@@ -1309,13 +1309,13 @@ void KImageMapEditor::deselectAll()
{
TQRect redrawRect= currentSelected->selectionRect();
currentSelected->reset();
- drawZone->repaintRect(redrawRect);
+ drawZone->tqrepaintRect(redrawRect);
updateActionAccess();
}
Area* KImageMapEditor::onArea(const TQPoint & p) const {
for (Area* s=areas->first();s!=0L;s=areas->next()) {
- if (s->contains(p))
+ if (s->tqcontains(p))
return s;
}
return 0L;
@@ -1324,7 +1324,7 @@ Area* KImageMapEditor::onArea(const TQPoint & p) const {
int KImageMapEditor::showTagEditor(Area *a) {
if (!a) return 0;
- drawZone->repaintArea(*a);
+ drawZone->tqrepaintArea(*a);
AreaDialog *dialog= new AreaDialog(this,a);
connect (dialog, TQT_SIGNAL(areaChanged(Area*)), this, TQT_SLOT(slotAreaChanged(Area*)));
@@ -1379,7 +1379,7 @@ TQPixmap KImageMapEditor::makeListViewPix(Area & a)
TQPixmap pix2((int)(pix.width()*shrinkFactor), (int)(pix.height()*shrinkFactor));
// Give all pixels a defined color
- pix2.fill(Qt::white);
+ pix2.fill(TQt::white);
TQPainter p(&pix2);
@@ -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 <em>%1</em> already exists.").arg(input));
+ KMessageBox::sorry(this->widget(), i18n("The name <em>%1</em> already exists.").tqarg(input));
else {
setMapName(input);
}
@@ -1529,7 +1529,7 @@ void KImageMapEditor::mapEditName()
void KImageMapEditor::mapShowHTML()
{
- KDialogBase *dialog= new KDialogBase(widget(),TQString::null,true,i18n("HTML Code of Map"),KDialogBase::Ok);
+ KDialogBase *dialog= new KDialogBase(widget(),TQString(),true,i18n("HTML Code of Map"),KDialogBase::Ok);
TQMultiLineEdit *edit = new TQMultiLineEdit(dialog);
edit->setText(getHtmlCode());
@@ -1568,7 +1568,7 @@ bool KImageMapEditor::openURL(const KURL & url) {
void KImageMapEditor::fileOpen() {
- TQString fileName = KFileDialog::getOpenFileName(TQString::null,
+ TQString fileName = KFileDialog::getOpenFileName(TQString(),
i18n("*.png *.jpg *.jpeg *.gif *.htm *.html|Web File\n"
"*.png *.jpg *.jpeg *.gif *.bmp *.xbm *.xpm *.pnm *.mng|Images\n"
"*.htm *.html|HTML Files\n"
@@ -1622,12 +1622,12 @@ void KImageMapEditor::fileSaveAs() {
if ( fileInfo.exists() )
{
if (KMessageBox::warningContinueCancel(widget(),
- i18n("<qt>The file <em>%1</em> already exists.<br>Do you want to overwrite it?</qt>").arg(fileInfo.fileName()),
+ i18n("<qt>The file <em>%1</em> already exists.<br>Do you want to overwrite it?</qt>").tqarg(fileInfo.fileName()),
i18n("Overwrite File?"), i18n("Overwrite"))==KMessageBox::Cancel)
return;
if(!fileInfo.isWritable()) {
- KMessageBox::sorry(widget(), i18n("<qt>You do not have write permission for the file <em>%1</em>.</qt>").arg(fileInfo.fileName()));
+ KMessageBox::sorry(widget(), i18n("<qt>You do not have write permission for the file <em>%1</em>.</qt>").tqarg(fileInfo.fileName()));
return;
}
}
@@ -1646,14 +1646,14 @@ bool KImageMapEditor::openFile()
if ( !fileInfo.exists() )
{
KMessageBox::information(widget(),
- i18n("<qt>The file <b>%1</b> does not exist.</qt>").arg(fileInfo.fileName()),
+ i18n("<qt>The file <b>%1</b> does not exist.</qt>").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;
@@ -1675,7 +1675,7 @@ TQDict<TQString> KImageMapEditor::getTagAttributes(TQTextStream & s, TQString &
TQChar w;
TQString attr,value;
- readText = TQString::null;
+ readText = TQString();
// get the tagname
while (!s.atEnd() && w!=" ") {
@@ -1717,8 +1717,8 @@ TQDict<TQString> KImageMapEditor::getTagAttributes(TQTextStream & s, TQString &
bool valueRead=false; // currently reading a value ?
TQChar quotation='\0'; // currently reading a value with quotation marks ?
bool php=false; // currently reading a php script
- attr=TQString::null;
- value=TQString::null;
+ attr=TQString();
+ value=TQString();
//get the other attributes
while (!s.atEnd() && w!=">")
@@ -1802,7 +1802,7 @@ TQDict<TQString> KImageMapEditor::getTagAttributes(TQTextStream & s, TQString &
quotation='\0';
valueRead=false;
dict.insert(attr,new TQString(value));
- attr = value = TQString::null;
+ attr = value = TQString();
}
} else
@@ -1810,7 +1810,7 @@ TQDict<TQString> KImageMapEditor::getTagAttributes(TQTextStream & s, TQString &
if (w==" ") {
valueRead=false;
dict.insert(attr,new TQString(value));
- attr = value = TQString::null;
+ attr = value = TQString();
}
} else {
if (w!=" ") {
@@ -1854,44 +1854,44 @@ bool KImageMapEditor::openHTMLFile(const KURL & url, const TQString & mapName, c
{
if (!readMap && !origcode.isEmpty()) {
_htmlContent.append( new HtmlElement(origcode));
- origcode = TQString::null;
+ origcode = TQString();
}
origcode.append("<");
attr=new TQDict<TQString>(getTagAttributes(s,temp));
origcode.append(temp);
- if (attr->find("tagname")) {
+ if (attr->tqfind("tagname")) {
- if (attr->find("tagname")->lower()=="img") {
+ if (attr->tqfind("tagname")->lower()=="img") {
HtmlImgElement *el = new HtmlImgElement(origcode);
el->imgTag = static_cast<ImageTag*>(attr);
images->append(el->imgTag);
_htmlContent.append(el);
- origcode = TQString::null;
+ origcode = TQString();
} else
- if (attr->find("tagname")->lower()=="map") {
+ if (attr->tqfind("tagname")->lower()=="map") {
map = new MapTag();
- map->name=(*attr->find("name"));
+ map->name=(*attr->tqfind("name"));
readMap=true;
} else
- if (attr->find("tagname")->lower()=="/map") {
+ if (attr->tqfind("tagname")->lower()=="/map") {
readMap=false;
maps->append(map);
HtmlMapElement *el = new HtmlMapElement(origcode);
el->mapTag = map;
_htmlContent.append(el);
- origcode = TQString::null;
+ origcode = TQString();
} else
if (readMap) {
- if (attr->find("tagname")->lower()=="area") {
+ if (attr->tqfind("tagname")->lower()=="area") {
map->prepend(attr);
}
} else {
_htmlContent.append(new HtmlElement(origcode));
- origcode = TQString::null;
+ origcode = TQString();
}
}
@@ -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->find("src");
+ TQString *src = imgTag->tqfind("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->find("usemap");
+ TQString *usemap = imageTag->tqfind("usemap");
if (usemap) {
// Remove the #
TQString usemapName = usemap->right(usemap->length()-1);
if (usemapName == map->name) {
- TQString *src = imageTag->find("src");
+ TQString *src = imageTag->tqfind("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.contains(containingText,false)) {
+ if (el->htmlCode.tqcontains(containingText,false)) {
return el;
}
}
@@ -2027,7 +2027,7 @@ HtmlImgElement* KImageMapEditor::findHtmlImgElement(ImageTag* tag) {
return 0L;
}
-void KImageMapEditor::addMap(const TQString & name = TQString::null) {
+void KImageMapEditor::addMap(const TQString & name = TQString()) {
HtmlMapElement* el = new HtmlMapElement("\n<map></map>");
MapTag* map = new MapTag();
map->name = name;
@@ -2038,7 +2038,7 @@ void KImageMapEditor::addMap(const TQString & name = TQString::null) {
// if we found one add the new map right after the body tag
if (bodyTag) {
- uint index = _htmlContent.find(bodyTag);
+ uint index = _htmlContent.tqfind(bodyTag);
// Add a newline before the map
_htmlContent.insert(index+1, new HtmlElement("\n"));
@@ -2107,16 +2107,16 @@ void KImageMapEditor::saveAreasToMapTag(MapTag* map) {
map->clear();
for (Area* a=areas->first();a!=0L;a=areas->next()) {
TQDict<TQString> *dict = new TQDict<TQString>(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<TQString> *dict = new TQDict<TQString>(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,49 +2159,49 @@ 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->tqfind("tqshape"))
+ tqshape=*tag->tqfind("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);
- if (tag->find("href"))
- a->setAttribute("href",*tag->find("href"));
+ if (tag->tqfind("href"))
+ a->setAttribute("href",*tag->tqfind("href"));
- if (tag->find("alt"))
- a->setAttribute("alt",*tag->find("alt"));
+ if (tag->tqfind("alt"))
+ a->setAttribute("alt",*tag->tqfind("alt"));
- if (tag->find("target"))
- a->setAttribute("target",*tag->find("target"));
+ if (tag->tqfind("target"))
+ a->setAttribute("target",*tag->tqfind("target"));
- if (tag->find("title"))
- a->setAttribute("title",*tag->find("title"));
+ if (tag->tqfind("title"))
+ a->setAttribute("title",*tag->tqfind("title"));
- if (tag->find("onclick"))
- a->setAttribute("onclick",*tag->find("onclick"));
+ if (tag->tqfind("onclick"))
+ a->setAttribute("onclick",*tag->tqfind("onclick"));
- if (tag->find("onmousedown"))
- a->setAttribute("onmousedown",*tag->find("onmousedown"));
+ if (tag->tqfind("onmousedown"))
+ a->setAttribute("onmousedown",*tag->tqfind("onmousedown"));
- if (tag->find("onmouseup"))
- a->setAttribute("onmouseup",*tag->find("onmouseup"));
+ if (tag->tqfind("onmouseup"))
+ a->setAttribute("onmouseup",*tag->tqfind("onmouseup"));
- if (tag->find("onmouseover"))
- a->setAttribute("onmouseover",*tag->find("onmouseover"));
+ if (tag->tqfind("onmouseover"))
+ a->setAttribute("onmouseover",*tag->tqfind("onmouseover"));
- if (tag->find("onmousemove"))
- a->setAttribute("onmousemove",*tag->find("onmousemove"));
+ if (tag->tqfind("onmousemove"))
+ a->setAttribute("onmousemove",*tag->tqfind("onmousemove"));
- if (tag->find("onmouseout"))
- a->setAttribute("onmouseout",*tag->find("onmouseout"));
+ if (tag->tqfind("onmouseout"))
+ a->setAttribute("onmouseout",*tag->tqfind("onmouseout"));
@@ -2211,8 +2211,8 @@ void KImageMapEditor::setMap(HtmlMapElement* mapElement) {
continue;
}
- if (tag->find("coords"))
- a->setCoords(*tag->find("coords"));
+ if (tag->tqfind("coords"))
+ a->setCoords(*tag->tqfind("coords"));
a->setMoving(false);
addArea(a);
@@ -2267,7 +2267,7 @@ void KImageMapEditor::saveImageMap(const KURL & url)
if (!TQFileInfo(url.directory()).isWritable()) {
KMessageBox::error(widget(),
- i18n("<qt>The file <i>%1</i> could not be saved, because you do not have the required write permissions.</qt>").arg(url.path()));
+ i18n("<qt>The file <i>%1</i> could not be saved, because you do not have the required write permissions.</qt>").tqarg(url.path()));
return;
}
@@ -2295,7 +2295,7 @@ void KImageMapEditor::saveImageMap(const KURL & url)
<< "<body>\n"
<< " " << getHTMLImageMap()
<< "\n"
- << " <img src=\"" << QExtFileInfo::toRelative(_imageUrl,KURL( url.directory() )).path() << "\""
+ << " <img src=\"" << TQExtFileInfo::toRelative(_imageUrl,KURL( url.directory() )).path() << "\""
<< " usemap=\"#" << _mapName << "\""
<< " width=\"" << drawZone->picture().width() << "\""
<< " height=\"" << drawZone->picture().height() << "\">\n"
@@ -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.find( areas->at(i) ) > -1 )
+ if (list.tqfind( 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.find( areas->at(i) ) > -1 )
+ if (list.tqfind( areas->at(i) ) > -1 )
{
a = areas->at(i);
areas->remove(a);
@@ -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("<qt>Are you sure you want to delete the map <i>%1</i>?"
- " <br><b>There is no way to undo this.</b></qt>").arg(selectedMap),
+ " <br><b>There is no way to undo this.</b></qt>").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("<qt>The file <i>%1</i> has been modified.<br>Do you want to save it?</qt>").arg(url().fileName()), TQString::null, KStdGuiItem::save(), KStdGuiItem::discard()) ) {
+ i18n("<qt>The file <i>%1</i> has been modified.<br>Do you want to save it?</qt>").tqarg(url().fileName()), TQString(), KStdGuiItem::save(), KStdGuiItem::discard()) ) {
case KMessageBox::Yes :
saveFile();
return true;
@@ -2671,7 +2671,7 @@ void KImageMapEditor::addImage(const KURL & imgUrl) {
if (imgUrl.isEmpty())
return;
- TQString relativePath ( QExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() );
+ TQString relativePath ( TQExtFileInfo::toRelative(imgUrl, KURL( url().directory() )).path() );
TQString imgHtml = TQString("<img src=\"")+relativePath+TQString("\">");
ImageTag *imgTag = new ImageTag();
@@ -2683,7 +2683,7 @@ void KImageMapEditor::addImage(const KURL & imgUrl) {
HtmlElement *bodyEl = findHtmlElement("<body");
if (bodyEl) {
- int bodyIndex = _htmlContent.find(bodyEl);
+ int bodyIndex = _htmlContent.tqfind(bodyEl);
_htmlContent.insert(bodyIndex+1, new HtmlElement("\n"));
_htmlContent.insert(bodyIndex+2, imgEl);
}
@@ -2727,7 +2727,7 @@ void KImageMapEditor::imageRemove() {
else {
ImageTag* selected = imagesListView->selectedImage();
if (selected) {
- TQString *url = selected->find("src");
+ TQString *url = selected->tqfind("src");
if (url) {
setPicture(KURL(*url));
}
@@ -2746,11 +2746,11 @@ void KImageMapEditor::imageUsemap() {
TQString usemap;
- if (imageTag->find("usemap"))
- usemap=*imageTag->find("usemap");
+ if (imageTag->tqfind("usemap"))
+ usemap=*imageTag->tqfind("usemap");
TQStringList maps = mapsListView->getMaps();
- int index = maps.findIndex(usemap);
+ int index = maps.tqfindIndex(usemap);
if (index == -1) {
maps.prepend("");
index = 0;
@@ -2759,12 +2759,12 @@ void KImageMapEditor::imageUsemap() {
#if KDE_IS_VERSION(3, 1, 90)
TQString input = KInputDialog::getItem(i18n("Enter Usemap"),
#else
- TQString input = QInputDialog::getItem(i18n("Enter Usemap"),
+ TQString input = TQInputDialog::getItem(i18n("Enter Usemap"),
#endif
i18n("Enter the usemap value:"),
maps,index,true,&ok,widget());
if (ok) {
- imageTag->replace("usemap", new TQString(input));
+ imageTag->tqreplace("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->find("tagname");
+ TQString *tagName = imgEl->imgTag->tqfind("tagname");
imgEl->htmlCode += TQString(*tagName);
TQDictIterator<TQString> it( *imgEl->imgTag );
diff --git a/kimagemapeditor/kimagemapeditor.h b/kimagemapeditor/kimagemapeditor.h
index f6177f9b..d2d6e24c 100644
--- a/kimagemapeditor/kimagemapeditor.h
+++ b/kimagemapeditor/kimagemapeditor.h
@@ -130,11 +130,12 @@ class KDockMainWindow;
class KImageMapEditor : public KParts::ReadWritePart {
Q_OBJECT
+ TQ_OBJECT
public :
enum ToolType { Selection, Rectangle, Circle, Polygon, Freehand, AddPoint, RemovePoint };
- KImageMapEditor(TQWidget *parentWidget, const char *,
- TQObject *parent, const char *name, const TQStringList & args = TQStringList());
+ KImageMapEditor(TQWidget *tqparentWidget, const char *,
+ TQObject *tqparent, const char *name, const TQStringList & args = TQStringList());
virtual ~KImageMapEditor();
static KAboutData *createAboutData();
@@ -213,7 +214,7 @@ public :
protected:
void init();
- bool openHTMLFile(const KURL &, const TQString & mapName = TQString::null, const TQString & imagePath = TQString::null);
+ bool openHTMLFile(const KURL &, const TQString & mapName = TQString(), const TQString & imagePath = TQString());
void saveImageMap(const KURL &);
/**
@@ -231,7 +232,7 @@ protected:
private:
// Stores the hole html file in a List
- // The entries are either a MapTag an ImageTag or a QString
+ // The entries are either a MapTag an ImageTag or a TQString
HtmlContent _htmlContent;
// the url of the working image;
diff --git a/kimagemapeditor/kimearea.cpp b/kimagemapeditor/kimearea.cpp
index cee54b8a..4a6be5be 100644
--- a/kimagemapeditor/kimearea.cpp
+++ b/kimagemapeditor/kimearea.cpp
@@ -85,7 +85,7 @@ Area::~Area() {
}
-bool Area::contains(const TQPoint &) const {
+bool Area::tqcontains(const TQPoint &) const {
return false;
}
@@ -100,7 +100,7 @@ TQString Area::attribute(const TQString & name) const
void Area::setAttribute(const TQString & name, const TQString & value)
{
- _attributes.replace(name.lower(),value);
+ _attributes.tqreplace(name.lower(),value);
if (value.isEmpty())
_attributes.remove(name.lower());
}
@@ -279,9 +279,9 @@ void Area::removeCoord(int pos) {
bool Area::removeSelectionPoint(TQRect * r)
{
- if (_selectionPoints->contains(r))
+ if (_selectionPoints->tqcontains(r))
{
- removeCoord(_selectionPoints->find(r));
+ removeCoord(_selectionPoints->tqfind(r));
return true;
}
@@ -319,7 +319,7 @@ void Area::drawHighlighting(TQPainter & p)
{
if (Area::highlightArea && !isMoving() && _highlightedPixmap)
{
- p.setRasterOp(Qt::CopyROP);
+ p.setRasterOp(TQt::CopyROP);
TQPoint point = TQPoint(rect().x(),rect().y());
if (point.x()<0)
@@ -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() ));
@@ -356,12 +356,12 @@ void Area::drawAlt(TQPainter & p)
if (highlightArea)
{
- p.setRasterOp(Qt::CopyROP);
- p.setPen(Qt::black);
+ p.setRasterOp(TQt::CopyROP);
+ p.setPen(TQt::black);
}
else
{
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
p.setPen(TQPen(TQColor("white"),1));
}
@@ -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() ));
@@ -392,15 +392,15 @@ void Area::draw(TQPainter & p)
if (i==currentHighlighted) {
TQRect r2(0,0,15,15);
r2.moveCenter(r->center()*scalex);
- p.setRasterOp(Qt::CopyROP);
+ p.setRasterOp(TQt::CopyROP);
p.setPen(TQPen(TQColor("lightgreen"),2));
p.drawEllipse(r2);
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
p.setPen(TQPen(TQColor("white"),1));
}
// Draw the selection point
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
TQRect r3(*r);
int d = 1;
@@ -415,7 +415,7 @@ void Area::draw(TQPainter & p)
r3.setSize(r3.size()+TQSize(2,2));
//+ r3.moveBy(-1,-1);
- p.setRasterOp(Qt::CopyROP);
+ p.setRasterOp(TQt::CopyROP);
p.setPen(TQPen(TQColor("lightgreen"),1));
p.setBrush(TQColor("lightgreen"));
p.drawPie(r3,0,5760);
@@ -435,7 +435,7 @@ void Area::draw(TQPainter & p)
{
drawAlt(p);
}
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
}
@@ -447,7 +447,7 @@ TQRect* Area::onSelectionPoint(const TQPoint & p, double zoom) const
r2.moveCenter(r2.center()*zoom);
- if (r2.contains(p))
+ if (r2.tqcontains(p))
{
return r;
@@ -477,12 +477,12 @@ TQPixmap Area::cutOut(const TQImage & image)
return dummyPix;
}
- // Get the mask from the subclasses
- TQBitmap mask=getMask();
+ // Get the tqmask from the subclasses
+ TQBitmap tqmask=getMask();
// The rectangle which is part of the image
TQRect partOfImage=rect();
- TQRect partOfMask(0,0,mask.width(),mask.height());
+ TQRect partOfMask(0,0,tqmask.width(),tqmask.height());
// If the area is outside of the image make the
@@ -507,8 +507,8 @@ TQPixmap Area::cutOut(const TQImage & image)
partOfMask.setY(myabs(rect().y()));
}
- TQImage tempImage=mask.convertToImage().copy(partOfMask);
- mask.convertFromImage(tempImage);
+ TQImage tempImage=tqmask.convertToImage().copy(partOfMask);
+ tqmask.convertFromImage(tempImage);
// partOfImage = partOfImage.normalize();
TQImage cut=image.copy(partOfImage);
@@ -521,23 +521,23 @@ TQPixmap Area::cutOut(const TQImage & image)
<< partOfMask.width() << "," << partOfMask.height() << "," << endl;
/*
- TQBitmap mask2(partOfMask.width(), partOfMask.height());
- TQPainter p4(&mask2);
- p4.drawPixmap( TQPoint(0,0) ,mask,partOfMask);
+ TQBitmap tqmask2(partOfMask.width(), partOfMask.height());
+ TQPainter p4(&tqmask2);
+ p4.drawPixmap( TQPoint(0,0) ,tqmask,partOfMask);
p4.flush();
p4.end();
*/
pix.convertFromImage(cut);
- setHighlightedPixmap(cut, mask);
+ setHighlightedPixmap(cut, tqmask);
TQPixmap retPix(pix.width(),pix.height());
TQPainter p3(&retPix);
// if transparent image fill the background
// with gimp-like rectangles
- if (pix.mask()) {
+ if (pix.tqmask()) {
TQPixmap backPix(32,32);
// Gimp like transparent rectangle
@@ -555,7 +555,7 @@ TQPixmap Area::cutOut(const TQImage & image)
p3.drawPixmap(TQPoint(0,0),pix);
p3.flush();
p3.end();
- retPix.setMask(mask);
+ retPix.setMask(tqmask);
return retPix;
}
@@ -566,7 +566,7 @@ TQBitmap Area::getMask() const
return b;
}
-void Area::setHighlightedPixmap( TQImage & im, TQBitmap & mask )
+void Area::setHighlightedPixmap( TQImage & im, TQBitmap & tqmask )
{
if (!Area::highlightArea)
return;
@@ -584,9 +584,9 @@ void Area::setHighlightedPixmap( TQImage & im, TQBitmap & mask )
{
for (int x=0; x < size.width(); x++)
{
- r = qRed(image.pixel(x,y));
- g = qGreen(image.pixel(x,y));
- b = qBlue(image.pixel(x,y));
+ r = tqRed(image.pixel(x,y));
+ g = tqGreen(image.pixel(x,y));
+ b = tqBlue(image.pixel(x,y));
r = (r *123 / 255)+132;
g = (g *123 / 255)+132;
b = (b *123 / 255)+132;
@@ -598,7 +598,7 @@ void Area::setHighlightedPixmap( TQImage & im, TQBitmap & mask )
_highlightedPixmap = new TQPixmap();
_highlightedPixmap->convertFromImage( image );
- _highlightedPixmap->setMask( mask );
+ _highlightedPixmap->setMask( tqmask );
if (_highlightedPixmap->isNull())
kdDebug() << "HighlightedPixmap is null" << endl;
@@ -639,15 +639,15 @@ void RectArea::draw(TQPainter & p)
{
drawHighlighting(p);
-// p.setRasterOp(Qt::CopyROP);
-// p.setRasterOp(Qt:: OrROP);
+// p.setRasterOp(TQt::CopyROP);
+// p.setRasterOp(TQt:: OrROP);
// TQBrush b(TQBrush::SolidPattern);
// TQBrush b(TQBrush::Dense4Pattern);
// TQBrush b(TQBrush::BDiagPattern);
// b.setColor(TQColor(32,32,32));
// p.fillRect(rect(), b);
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
p.setPen(TQPen(TQColor("white"),1));
TQRect r(rect());
r.setWidth(r.width()+1);
@@ -659,32 +659,32 @@ void RectArea::draw(TQPainter & p)
TQBitmap RectArea::getMask() const
{
- TQBitmap mask(rect().width(),rect().height());
+ TQBitmap tqmask(rect().width(),rect().height());
- mask.fill(Qt::color0);
- TQPainter p(&mask);
- p.setBackgroundColor(Qt::color0);
- p.setPen(Qt::color1);
- p.setBrush(Qt::color1);
- mask.fill(Qt::color1);
+ tqmask.fill(TQt::color0);
+ TQPainter p(&tqmask);
+ p.setBackgroundColor(TQt::color0);
+ p.setPen(TQt::color1);
+ p.setBrush(TQt::color1);
+ tqmask.fill(TQt::color1);
p.end();
- return mask;
+ return tqmask;
}
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;
}
-bool RectArea::contains(const TQPoint & p) const{
- return rect().contains(p);
+bool RectArea::tqcontains(const TQPoint & p) const{
+ return rect().tqcontains(p);
}
void RectArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p)
@@ -747,7 +747,7 @@ bool RectArea::setCoords(const TQString & s)
TQString RectArea::getHTMLCode() const {
TQString retStr;
retStr+="<area ";
- retStr+="shape=\"rect\" ";
+ retStr+="tqshape=\"rect\" ";
retStr+=getHTMLAttributes();
@@ -791,7 +791,7 @@ void CircleArea::draw(TQPainter & p)
drawHighlighting(p);
/*
- p.setRasterOp(Qt::CopyROP);
+ p.setRasterOp(TQt::CopyROP);
TQBrush bold = p.brush();
TQBrush b(TQBrush::Dense5Pattern);
b.setColor(TQColor("green"));
@@ -802,7 +802,7 @@ void CircleArea::draw(TQPainter & p)
p.drawChord(r,0,5760);
p.setBrush(bold);
*/
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
p.setPen(TQPen(TQColor("white"),1));
TQRect r(_rect);
@@ -815,36 +815,36 @@ void CircleArea::draw(TQPainter & p)
TQBitmap CircleArea::getMask() const
{
- TQBitmap mask(_rect.width(),_rect.height());
+ TQBitmap tqmask(_rect.width(),_rect.height());
- mask.fill(Qt::color0);
- TQPainter p(&mask);
- p.setBackgroundColor(Qt::color0);
- p.setPen(Qt::color1);
- p.setBrush(Qt::color1);
+ tqmask.fill(TQt::color0);
+ TQPainter p(&tqmask);
+ p.setBackgroundColor(TQt::color0);
+ p.setPen(TQt::color1);
+ p.setBrush(TQt::color1);
p.drawPie(TQRect(0,0,_rect.width(),_rect.height()),0,5760);
p.flush();
p.end();
- return mask;
+ return tqmask;
}
TQString CircleArea::coordsToString() const
{
TQString retStr=TQString("%1,%2,%3")
- .arg(_rect.center().x())
- .arg(_rect.center().y())
- .arg(_rect.width()/2);
+ .tqarg(_rect.center().x())
+ .tqarg(_rect.center().y())
+ .tqarg(_rect.width()/2);
return retStr;
}
-bool CircleArea::contains(const TQPoint & p) const
+bool CircleArea::tqcontains(const TQPoint & p) const
{
TQRegion r(_rect,TQRegion::Ellipse);
- return r.contains(p);
+ return r.tqcontains(p);
}
void CircleArea::moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p)
@@ -949,7 +949,7 @@ bool CircleArea::setCoords(const TQString & s)
TQString CircleArea::getHTMLCode() const {
TQString retStr;
retStr+="<area ";
- retStr+="shape=\"circle\" ";
+ retStr+="tqshape=\"circle\" ";
retStr+=getHTMLAttributes();
@@ -985,16 +985,16 @@ void PolyArea::draw(TQPainter & p)
{
drawHighlighting(p);
- p.setRasterOp(Qt::XorROP);
+ p.setRasterOp(TQt::XorROP);
p.setPen(TQPen(TQColor("white"),1));
if (_coords->count()==0) return;
if (_finished)
- p.drawPolygon ( *_coords,false,0,_coords->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));
@@ -1009,22 +1009,22 @@ void PolyArea::draw(TQPainter & p)
TQBitmap PolyArea::getMask() const
{
- TQBitmap mask(_rect.width(),_rect.height());
+ TQBitmap tqmask(_rect.width(),_rect.height());
- mask.fill(Qt::color0);
- TQPainter p(&mask);
- p.setBackgroundColor(Qt::color0);
- p.setPen(Qt::color1);
- p.setBrush(Qt::color1);
+ tqmask.fill(TQt::color0);
+ TQPainter p(&tqmask);
+ p.setBackgroundColor(TQt::color0);
+ p.setPen(TQt::color1);
+ p.setBrush(TQt::color1);
p.setClipping(true);
TQRegion r(*_coords);
r.translate(-_rect.left(),-_rect.top());
p.setClipRegion(r);
- p.fillRect(TQRect(0,0,_rect.width(),_rect.height()),Qt::color1);
+ p.fillRect(TQRect(0,0,_rect.width(),_rect.height()),TQt::color1);
p.flush();
p.end();
- return mask;
+ return tqmask;
}
TQString PolyArea::coordsToString() const
@@ -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);
@@ -1160,12 +1160,12 @@ int PolyArea::addCoord(const TQPoint & p)
}
-bool PolyArea::contains(const TQPoint & p) const
+bool PolyArea::tqcontains(const TQPoint & p) const
{
// A line can't contain a point
if (_coords->count() >2 ) {
TQRegion r(*_coords);
- return r.contains(p);
+ return r.tqcontains(p);
}
else
return false;
@@ -1224,7 +1224,7 @@ bool PolyArea::setCoords(const TQString & s)
TQString PolyArea::getHTMLCode() const {
TQString retStr;
retStr+="<area ";
- retStr+="shape=\"poly\" ";
+ retStr+="tqshape=\"poly\" ";
retStr+=getHTMLAttributes();
@@ -1283,7 +1283,7 @@ void DefaultArea::draw(TQPainter &)
TQString DefaultArea::getHTMLCode() const {
TQString retStr;
retStr+="<area ";
- retStr+="shape=\"default\" ";
+ retStr+="tqshape=\"default\" ";
retStr+=getHTMLAttributes();
@@ -1302,7 +1302,7 @@ AreaSelection::AreaSelection()
{
_areas = new AreaList();
_name = "Selection";
- invalidate();
+ tqinvalidate();
}
AreaSelection::~AreaSelection() {
@@ -1338,7 +1338,7 @@ void AreaSelection::add(Area *a)
for (Area* area = list.first(); area != 0L; area = list.next() )
{
- if ( _areas->find( area ) == -1 ) {
+ if ( _areas->tqfind( area ) == -1 ) {
_areas->append( area ); // Must come before area->setSelected
area->setSelected( true );
}
@@ -1346,23 +1346,23 @@ void AreaSelection::add(Area *a)
}
else
{
- if ( _areas->find( a ) == -1 ) {
+ if ( _areas->tqfind( a ) == -1 ) {
_areas->append( a ); // Must come before a->setSelected
a->setSelected( true );
}
}
- invalidate();
+ tqinvalidate();
}
void AreaSelection::remove(Area *a)
{
- if (_areas->find(a) == -1)
+ if (_areas->tqfind(a) == -1)
return;
a->setSelected( false );
_areas->remove( a );
- invalidate();
+ tqinvalidate();
}
void AreaSelection::reset()
@@ -1375,17 +1375,17 @@ void AreaSelection::reset()
}
_areas->clear();
- invalidate();
+ tqinvalidate();
}
-bool AreaSelection::contains(const TQPoint & p) const
+bool AreaSelection::tqcontains(const TQPoint & p) const
{
bool b=false;
AreaListIterator it=getAreaListIterator();
for ( ; it.current() != 0L; ++it )
{
- if ( it.current()->contains( p ) )
+ if ( it.current()->tqcontains( p ) )
{
b=true;
break;
@@ -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();
}
}
@@ -1730,7 +1730,7 @@ bool AreaSelection::isMoving() const
**/
bool AreaSelection::allAreasWithin(const TQRect & r) const
{
- if ( ! r.contains(rect()) )
+ if ( ! r.tqcontains(rect()) )
{
AreaListIterator it=getAreaListIterator();
diff --git a/kimagemapeditor/kimearea.h b/kimagemapeditor/kimearea.h
index d23ad18c..5c084a02 100644
--- a/kimagemapeditor/kimearea.h
+++ b/kimagemapeditor/kimearea.h
@@ -73,7 +73,7 @@ public:
virtual Area* clone() const;
// Default implementation; is specified by subclasses
- virtual bool contains(const TQPoint &) const;
+ virtual bool tqcontains(const TQPoint &) const;
// Default implementation; is specified by subclasses
virtual TQString coordsToString() const;
virtual void draw(TQPainter &);
@@ -172,7 +172,7 @@ class RectArea : public Area
virtual ~RectArea();
virtual Area* clone() const;
- virtual bool contains(const TQPoint & p) const;
+ virtual bool tqcontains(const TQPoint & p) const;
virtual TQString coordsToString() const;
virtual void draw(TQPainter & p);
virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p);
@@ -194,7 +194,7 @@ class CircleArea : public Area
virtual ~CircleArea();
virtual Area* clone() const;
- virtual bool contains(const TQPoint & p) const;
+ virtual bool tqcontains(const TQPoint & p) const;
virtual TQString coordsToString() const;
virtual void draw(TQPainter & p);
virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p);
@@ -217,7 +217,7 @@ class PolyArea :public Area
virtual ~PolyArea();
virtual Area* clone() const;
- virtual bool contains(const TQPoint & p) const;
+ virtual bool tqcontains(const TQPoint & p) const;
virtual TQString coordsToString() const;
virtual void draw(TQPainter & p);
virtual void moveSelectionPoint(TQRect* selectionPoint, const TQPoint & p);
@@ -294,7 +294,7 @@ class AreaSelection : public Area {
/**
* Overiden Methods of the Area class
*/
- virtual bool contains(const TQPoint & p) const;
+ virtual bool tqcontains(const TQPoint & p) const;
/**
*
@@ -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 59157f9d..1d2b08ee 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();
@@ -147,7 +147,7 @@ MoveCommand::~MoveCommand () {
void MoveCommand::execute()
{
- // only for repainting reasons
+ // only for tqrepainting reasons
Area* tempArea = _areaSelection->clone();
_areaSelection->moveTo( _newPoint.x(), _newPoint.y() );
@@ -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)
{
@@ -269,15 +269,15 @@ void AddPointCommand::execute()
void AddPointCommand::unexecute()
{
// TQRect *selectionPoint = _areaSelection->onSelectionPoint(_point);
- Area* repaintArea = _areaSelection->clone();
+ Area* tqrepaintArea = _areaSelection->clone();
_areaSelection->removeCoord(_coordpos);
_areaSelection->setMoving(false);
_document->slotAreaChanged( _areaSelection );
- _document->slotAreaChanged( repaintArea );
+ _document->slotAreaChanged( tqrepaintArea );
- delete repaintArea;
+ delete tqrepaintArea;
}
RemovePointCommand::RemovePointCommand (KImageMapEditor *document, AreaSelection *a, Area *oldArea)
@@ -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 0196b0e5..4cb26986 100644
--- a/kimagemapeditor/kimedialogs.cpp
+++ b/kimagemapeditor/kimedialogs.cpp
@@ -47,8 +47,8 @@
// LOCAL
#include "kimedialogs.h"
-CoordsEdit::CoordsEdit(TQWidget *parent, Area* a)
- : TQWidget(parent)
+CoordsEdit::CoordsEdit(TQWidget *tqparent, Area* a)
+ : TQWidget(tqparent)
{
area=a;
}
@@ -66,56 +66,56 @@ CoordsEdit::~CoordsEdit()
{
}
-RectCoordsEdit::RectCoordsEdit(TQWidget *parent, Area* a)
- : CoordsEdit(parent,a)
+RectCoordsEdit::RectCoordsEdit(TQWidget *tqparent, Area* a)
+ : CoordsEdit(tqparent,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() {
@@ -127,47 +127,47 @@ void RectCoordsEdit::applyChanges() {
area->setRect(r);
}
-CircleCoordsEdit::CircleCoordsEdit(TQWidget *parent, Area* a)
- : CoordsEdit(parent,a)
+CircleCoordsEdit::CircleCoordsEdit(TQWidget *tqparent, Area* a)
+ : CoordsEdit(tqparent,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);
}
@@ -180,11 +180,11 @@ void CircleCoordsEdit::applyChanges() {
area->setRect(r);
}
-PolyCoordsEdit::PolyCoordsEdit(TQWidget *parent, Area* a)
- : CoordsEdit(parent,a)
+PolyCoordsEdit::PolyCoordsEdit(TQWidget *tqparent, Area* a)
+ : CoordsEdit(tqparent,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);
}
@@ -274,32 +274,32 @@ void PolyCoordsEdit::applyChanges() {
}
}
-SelectionCoordsEdit::SelectionCoordsEdit(TQWidget *parent, Area* a)
- : CoordsEdit(parent,a)
+SelectionCoordsEdit::SelectionCoordsEdit(TQWidget *tqparent, Area* a)
+ : CoordsEdit(tqparent,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* tqparent, TQGridLayout *tqlayout, int y, const TQString & value, const TQString & name)
{
- TQLineEdit* edit=new TQLineEdit(value,parent);
- layout->addWidget(edit,y,2);
- TQLabel* lbl=new TQLabel(name,parent);
+ TQLineEdit* edit=new TQLineEdit(value,tqparent);
+ tqlayout->addWidget(edit,y,2);
+ TQLabel* lbl=new TQLabel(name,tqparent);
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;
@@ -408,59 +408,59 @@ TQWidget* AreaDialog::createButtonBar()
}
-AreaDialog::AreaDialog(KImageMapEditor* parent,Area * a)
- : KDialog(parent->widget(),"",true)
-// : KDialogBase(Tabbed,i18n("Area Tag Editor"),Ok|Apply|Cancel,Ok,parent,"")
-// : KDialogBase(parent,"",true,"Area Tag Editor",Ok|Apply|Cancel,Ok,true)
+AreaDialog::AreaDialog(KImageMapEditor* tqparent,Area * a)
+ : KDialog(tqparent->widget(),"",true)
+// : KDialogBase(Tabbed,i18n("Area Tag Editor"),Ok|Apply|Cancel,Ok,tqparent,"")
+// : KDialogBase(tqparent,"",true,"Area Tag Editor",Ok|Apply|Cancel,Ok,true)
{
if (!a) {
slotCancel();
return;
}
- _document=parent;
+ _document=tqparent;
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("<b>"+shape+"</b>",this);
- lbl->setTextFormat(Qt::RichText);
- layout->addWidget(lbl);
+ TQLabel *lbl = new TQLabel("<b>"+tqshape+"</b>",this);
+ lbl->setTextFormat(TQt::RichText);
+ 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);
@@ -485,28 +485,28 @@ AreaDialog::~AreaDialog() {
delete oldArea;
}
-CoordsEdit* AreaDialog::createCoordsEdit(TQWidget *parent, Area *a) {
+CoordsEdit* AreaDialog::createCoordsEdit(TQWidget *tqparent, Area *a) {
if (!a) return 0;
switch (a->type()) {
case Area::Rectangle :
- return new RectCoordsEdit(parent,a);
+ return new RectCoordsEdit(tqparent,a);
break;
case Area::Circle :
- return new CircleCoordsEdit(parent,a);
+ return new CircleCoordsEdit(tqparent,a);
break;
case Area::Polygon :
- return new PolyCoordsEdit(parent,a);
+ return new PolyCoordsEdit(tqparent,a);
break;
case Area::Selection :
- return new SelectionCoordsEdit(parent,a);
+ return new SelectionCoordsEdit(tqparent,a);
break;
- case Area::Default : return new CoordsEdit(parent,a); break;
- default : return new CoordsEdit(parent,a);break;
+ case Area::Default : return new CoordsEdit(tqparent,a); break;
+ default : return new CoordsEdit(tqparent,a);break;
}
}
void AreaDialog::slotChooseHref() {
- KURL url=KFileDialog::getOpenURL(TQString::null, "*|" + i18n( "All Files" ), this, i18n("Choose File"));
+ KURL url=KFileDialog::getOpenURL(TQString(), "*|" + i18n( "All Files" ), this, i18n("Choose File"));
if (!url.isEmpty()) {
hrefEdit->setText(url.url());
}
@@ -570,8 +570,8 @@ void AreaDialog::slotUpdateArea() {
oldArea->setRect(area->rect());
}
-ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_images,const KURL & _baseUrl)
- : KDialogBase(parent,"",true,i18n( "Choose Map & Image to Edit" ),Ok,Ok,true)
+ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* tqparent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_images,const KURL & _baseUrl)
+ : KDialogBase(tqparent,"",true,i18n( "Choose Map & Image to Edit" ),Ok,Ok,true)
{
baseUrl=_baseUrl;
maps=_maps;
@@ -580,17 +580,17 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_
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<MapTag> *_
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<MapTag> *_
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<MapTag> *_
// 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()) {
@@ -648,29 +648,29 @@ ImageMapChooseDialog::ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_
resize(510,460);
}
-void ImageMapChooseDialog::initImageListTable(TQWidget* parent) {
+void ImageMapChooseDialog::initImageListTable(TQWidget* tqparent) {
if (images->isEmpty()) {
- imageListTable= new TQTable(1,1,parent);
+ imageListTable= new TQTable(1,1,tqparent);
imageListTable->setText(0,0,i18n("No images found"));
imageListTable->setEnabled(false);
imageListTable->horizontalHeader()->hide();
imageListTable->setTopMargin(0);
imageListTable->setColumnStretchable(0,true);
} else {
- imageListTable= new TQTable(images->count(),2,parent);
+ imageListTable= new TQTable(images->count(),2,tqparent);
imageListTable->setColumnStretchable(0,true);
}
imageListTable->verticalHeader()->hide();
imageListTable->setLeftMargin(0);
- TQLabel *lbl= new TQLabel(i18n("&Images"),parent);
+ TQLabel *lbl= new TQLabel(i18n("&Images"),tqparent);
lbl->setBuddy(imageListTable);
- parent->layout()->add(lbl);
- parent->layout()->add(imageListTable);
+ tqparent->tqlayout()->add(lbl);
+ tqparent->tqlayout()->add(imageListTable);
if (images->isEmpty())
return;
@@ -687,10 +687,10 @@ void ImageMapChooseDialog::initImageListTable(TQWidget* parent) {
for (ImageTag *tag = images->first(); tag!=0L; tag=images->next()) {
TQString src="";
TQString usemap="";
- if (tag->find("src"))
- src=*tag->find("src");
- if (tag->find("usemap"))
- usemap=*tag->find("usemap");
+ if (tag->tqfind("src"))
+ src=*tag->tqfind("src");
+ if (tag->tqfind("usemap"))
+ usemap=*tag->tqfind("usemap");
imageListTable->setText(row,0,src);
imageListTable->setText(row,1,usemap);
@@ -711,8 +711,8 @@ void ImageMapChooseDialog::slotImageChanged()
{
int i=imageListTable->currentRow();
TQImage pix;
- if (images->at(i)->find("src")) {
- TQString str=*images->at(i)->find("src");
+ if (images->at(i)->tqfind("src")) {
+ TQString str=*images->at(i)->tqfind("src");
// relative url
pixUrl=KURL(baseUrl,str);
pix=TQImage(pixUrl.path());
@@ -731,7 +731,7 @@ void ImageMapChooseDialog::slotImageChanged()
pix2.convertFromImage(pix);
imagePreview->setPixmap(pix2);
-// imagePreview->repaint();
+// imagePreview->tqrepaint();
}
void ImageMapChooseDialog::selectImageWithUsemap(const TQString & usemap) {
@@ -749,8 +749,8 @@ void ImageMapChooseDialog::slotMapChanged(int i) {
selectImageWithUsemap(currentMap->name);
}
-PreferencesDialog::PreferencesDialog(TQWidget *parent, KConfig* conf)
- : KDialogBase(parent,"",true,i18n("Preferences"),Ok|Apply|Cancel,Ok,true)
+PreferencesDialog::PreferencesDialog(TQWidget *tqparent, KConfig* conf)
+ : KDialogBase(tqparent,"",true,i18n("Preferences"),Ok|Apply|Cancel,Ok,true)
{
config = conf;
TQVBox *page=new TQVBox(this);
@@ -836,8 +836,8 @@ void PreferencesDialog::slotApply( void ) {
emit applyClicked();
}
-HTMLPreviewDialog::HTMLPreviewDialog(TQWidget* parent, KURL url, const TQString & htmlCode)
- : KDialogBase(parent, "", true, i18n("Preview"), KDialogBase::Ok)
+HTMLPreviewDialog::HTMLPreviewDialog(TQWidget* tqparent, KURL url, const TQString & htmlCode)
+ : KDialogBase(tqparent, "", true, i18n("Preview"), KDialogBase::Ok)
{
tempFile = new KTempFile(url.directory(false), ".html");
tempFile->setAutoDelete(true);
@@ -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 7445e584..90b445a2 100644
--- a/kimagemapeditor/kimedialogs.h
+++ b/kimagemapeditor/kimedialogs.h
@@ -2,7 +2,7 @@
kimedialogs.h - description
-------------------
begin : Tue Apr 17 2001
- copyright : (C) 2001 by Jan Sch�fer
+ copyright : (C) 2001 by Jan Sch�fer
***************************************************************************/
@@ -33,8 +33,9 @@ class TQSpinBox;
class CoordsEdit : public TQWidget {
Q_OBJECT
+ TQ_OBJECT
public :
- CoordsEdit(TQWidget *parent, Area* a);
+ CoordsEdit(TQWidget *tqparent, Area* a);
virtual ~CoordsEdit();
virtual void applyChanges();
protected:
@@ -47,7 +48,7 @@ Q_OBJECT
class RectCoordsEdit : public CoordsEdit {
public:
- RectCoordsEdit(TQWidget *parent, Area* a);
+ RectCoordsEdit(TQWidget *tqparent, Area* a);
virtual void applyChanges();
private:
TQSpinBox *topXSpin;
@@ -58,7 +59,7 @@ class RectCoordsEdit : public CoordsEdit {
class CircleCoordsEdit : public CoordsEdit {
public:
- CircleCoordsEdit(TQWidget *parent, Area* a);
+ CircleCoordsEdit(TQWidget *tqparent, Area* a);
virtual void applyChanges();
private:
TQSpinBox *centerXSpin;
@@ -69,9 +70,10 @@ class CircleCoordsEdit : public CoordsEdit {
class TQTable;
class PolyCoordsEdit : public CoordsEdit {
-Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- PolyCoordsEdit(TQWidget *parent, Area* a);
+ PolyCoordsEdit(TQWidget *tqparent, Area* a);
~PolyCoordsEdit();
virtual void applyChanges();
private:
@@ -84,9 +86,10 @@ Q_OBJECT
};
class SelectionCoordsEdit : public CoordsEdit {
-Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- SelectionCoordsEdit(TQWidget *parent, Area* a);
+ SelectionCoordsEdit(TQWidget *tqparent, Area* a);
virtual void applyChanges();
private:
TQSpinBox *topXSpin;
@@ -99,7 +102,8 @@ class TQCheckBox;
class TQGridLayout;
class AreaDialog : public KDialog {
-Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
private:
Area *area;
Area *oldArea; // Only for drawing reasons
@@ -118,13 +122,13 @@ Q_OBJECT
TQLineEdit *onMouseOutEdit;
CoordsEdit *coordsEdit;
- CoordsEdit* createCoordsEdit(TQWidget *parent, Area *a);
+ CoordsEdit* createCoordsEdit(TQWidget *tqparent, Area *a);
TQCheckBox *defaultAreaChk;
KImageMapEditor *_document;
public:
- AreaDialog(KImageMapEditor* parent,Area * a);
+ AreaDialog(KImageMapEditor* tqparent,Area * a);
~AreaDialog();
protected slots:
virtual void slotOk();
@@ -133,7 +137,7 @@ Q_OBJECT
void slotChooseHref();
void slotUpdateArea();
- TQLineEdit* createLineEdit(TQWidget* parent, TQGridLayout *layout, int y, const TQString & value, const TQString & name);
+ TQLineEdit* createLineEdit(TQWidget* tqparent, TQGridLayout *tqlayout, int y, const TQString & value, const TQString & name);
TQWidget* createGeneralPage();
TQWidget* createCoordsPage();
TQWidget* createJavascriptPage();
@@ -148,7 +152,8 @@ class TQLabel;
class ImageMapChooseDialog : public KDialogBase {
-Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
private:
TQTable *imageListTable;
TQLabel *imagePreview;
@@ -159,7 +164,7 @@ Q_OBJECT
KURL baseUrl;
void initImageListTable(TQWidget*);
public:
- ImageMapChooseDialog(TQWidget* parent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_images, const KURL & _baseUrl);
+ ImageMapChooseDialog(TQWidget* tqparent,TQPtrList<MapTag> *_maps,TQPtrList<ImageTag> *_images, const KURL & _baseUrl);
~ImageMapChooseDialog();
KURL pixUrl;
MapTag* currentMap;
@@ -173,9 +178,10 @@ Q_OBJECT
class KConfig;
class PreferencesDialog : public KDialogBase {
-Q_OBJECT
+ Q_OBJECT
+ TQ_OBJECT
public:
- PreferencesDialog(TQWidget *parent,KConfig*);
+ PreferencesDialog(TQWidget *tqparent,KConfig*);
~PreferencesDialog();
protected slots:
virtual void slotDefault( void );
diff --git a/kimagemapeditor/kimeshell.cpp b/kimagemapeditor/kimeshell.cpp
index 071f3299..7d92e8fb 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
@@ -54,7 +54,7 @@ KimeShell::KimeShell(const char *name )
mainDock->setEnableDocking(KDockWidget::DockNone);
setView( mainDock); // central widget in a KDE mainwindow
setMainDockWidget( mainDock); // master dockwidget
- m_part = new KImageMapEditor( w, "kimagemapeditor", this, "kimagemapeditor");
+ m_part = new KImageMapEditor( w, "kimagemapeditor", TQT_TQOBJECT(this), "kimagemapeditor");
// setCentralWidget( part->widget() );
@@ -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 & )));
@@ -109,16 +109,16 @@ bool KimeShell::queryExit()
void KimeShell::setupActions()
{
- (void)KStdAction::openNew(this, TQT_SLOT(fileNew()), actionCollection());
+ (void)KStdAction::openNew(TQT_TQOBJECT(this), TQT_SLOT(fileNew()), actionCollection());
// File Quit
- (void)KStdAction::quit(this, TQT_SLOT(close()),actionCollection());
+ (void)KStdAction::quit(TQT_TQOBJECT(this), TQT_SLOT(close()),actionCollection());
- (void)KStdAction::showToolbar(this, TQT_SLOT(optionsShowToolbar()), actionCollection());
- (void)KStdAction::keyBindings(this, TQT_SLOT(optionsConfigureKeys()), actionCollection());
- (void)KStdAction::configureToolbars(this, TQT_SLOT(optionsConfigureToolbars()), actionCollection());
- (void)KStdAction::showStatusbar(this, TQT_SLOT(optionsShowStatusbar()), actionCollection());
+ (void)KStdAction::showToolbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowToolbar()), actionCollection());
+ (void)KStdAction::keyBindings(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureKeys()), actionCollection());
+ (void)KStdAction::configureToolbars(TQT_TQOBJECT(this), TQT_SLOT(optionsConfigureToolbars()), actionCollection());
+ (void)KStdAction::showStatusbar(TQT_TQOBJECT(this), TQT_SLOT(optionsShowStatusbar()), actionCollection());
}
@@ -155,7 +155,7 @@ void KimeShell::openLastFile()
void KimeShell::fileOpen()
{
- KURL url=KFileDialog::getOpenURL(TQString::null,
+ KURL url=KFileDialog::getOpenURL(TQString(),
"*.png *.jpg *.jpeg *.gif *.htm *.html|" + i18n( "Web Files" ) + "\n"
"*.png *.jpg *.jpeg *.gif *.bmp *.xbm *.xpm *.pnm *.mng|" + i18n( "Images" ) + "\n"
"*.htm *.html|" + i18n( "HTML Files" ) + "\n"
diff --git a/kimagemapeditor/kimeshell.h b/kimagemapeditor/kimeshell.h
index 28026524..e361216c 100644
--- a/kimagemapeditor/kimeshell.h
+++ b/kimagemapeditor/kimeshell.h
@@ -25,6 +25,7 @@ class KImageMapEditor;
class KimeShell : public KParts::DockMainWindow
{
Q_OBJECT
+ TQ_OBJECT
public:
KimeShell( const char *name=0 );
diff --git a/kimagemapeditor/mapslistview.cpp b/kimagemapeditor/mapslistview.cpp
index d3a9ebe9..d215e157 100644
--- a/kimagemapeditor/mapslistview.cpp
+++ b/kimagemapeditor/mapslistview.cpp
@@ -23,8 +23,8 @@
#include "mapslistview.h"
-MapsListView::MapsListView(TQWidget *parent, const char *name)
-: TQVBox(parent, name) {
+MapsListView::MapsListView(TQWidget *tqparent, const char *name)
+: TQVBox(tqparent, name) {
_listView = new KListView(this);
_listView->addColumn(i18n("Maps"));
_listView->setFullWidth(true);
@@ -42,7 +42,7 @@ MapsListView::MapsListView(TQWidget *parent, const char *name)
MapsListView::~MapsListView() {
}
-void MapsListView::addMap(const TQString & name = TQString::null) {
+void MapsListView::addMap(const TQString & name = TQString()) {
new TQListViewItem(_listView,name);
//kdDebug() << "MapsListView::addMap : Added map '" << name << "'" << endl;
@@ -56,7 +56,7 @@ void MapsListView::addMaps(TQPtrList<MapTag> * maps) {
}
void MapsListView::selectMap(const TQString & name) {
- TQListViewItem* item = _listView->findItem(name,0);
+ TQListViewItem* item = _listView->tqfindItem(name,0);
if (item) {
selectMap(item);
} else
@@ -83,7 +83,7 @@ TQString MapsListView::selectedMap() {
}
void MapsListView::removeMap(const TQString & name) {
- TQListViewItem* item = _listView->findItem(name,0);
+ TQListViewItem* item = _listView->tqfindItem(name,0);
if (item) {
_listView->takeItem(item);
_listView->setSelected(_listView->currentItem(),true);
@@ -108,7 +108,7 @@ void MapsListView::slotItemRenamed(TQListViewItem* item) {
void MapsListView::changeMapName(const TQString & oldName, const TQString & newName) {
// kdDebug() << "MapsListView::changeMapName : " << oldName << " to " << newName << endl;
- TQListViewItem* item = _listView->findItem(oldName,0);
+ TQListViewItem* item = _listView->tqfindItem(oldName,0);
if (item) {
item->setText(0,newName);
// kdDebug() << "MapsListView::changeMapName : successful" << endl;
diff --git a/kimagemapeditor/mapslistview.h b/kimagemapeditor/mapslistview.h
index 467279ae..ca1707af 100644
--- a/kimagemapeditor/mapslistview.h
+++ b/kimagemapeditor/mapslistview.h
@@ -28,11 +28,12 @@ class KListView;
*
* Jan Schaefer
**/
-class MapsListView : public QVBox
+class MapsListView : public TQVBox
{
Q_OBJECT
+ TQ_OBJECT
public:
- MapsListView(TQWidget *parent, const char *name);
+ MapsListView(TQWidget *tqparent, const char *name);
~MapsListView();
/**
@@ -41,7 +42,7 @@ public:
void addMap(const TQString &);
/**
- * Adds all maps of the given QList to the ListView
+ * Adds all maps of the given TQList to the ListView
*/
void addMaps(TQPtrList<MapTag> *);
diff --git a/kimagemapeditor/qextfileinfo.cpp b/kimagemapeditor/qextfileinfo.cpp
index 4c10d102..19c638cf 100644
--- a/kimagemapeditor/qextfileinfo.cpp
+++ b/kimagemapeditor/qextfileinfo.cpp
@@ -32,10 +32,10 @@
//app includes
#include "qextfileinfo.h"
-TQString QExtFileInfo::lastErrorMsg = "";
+TQString TQExtFileInfo::lastErrorMsg = "";
/** create a relative short url based in baseURL*/
-KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
+KURL TQExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
{
KURL resultURL = urlToConvert;
if (urlToConvert.protocol() == baseURL.protocol())
@@ -52,8 +52,8 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
int pos1=0;
for (;;)
{
- pos=path.find("/");
- pos1=basePath.find("/");
+ pos=path.tqfind("/");
+ pos1=basePath.tqfind("/");
if ( pos<0 || pos1<0 ) break;
if ( path.left(pos+1 ) == basePath.left(pos1+1) )
{
@@ -65,7 +65,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
};
if ( basePath == "/" ) basePath="";
- int level = basePath.contains("/");
+ int level = basePath.tqcontains("/");
for (int i=0; i<level; i++)
{
path="../"+path;
@@ -79,7 +79,7 @@ KURL QExtFileInfo::toRelative(const KURL& urlToConvert,const KURL& baseURL)
return resultURL;
}
/** convert relative filename to absolute */
-KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
+KURL TQExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
{
KURL resultURL = urlToConvert;
if (urlToConvert.protocol() == baseURL.protocol() && !urlToConvert.path().startsWith("/"))
@@ -87,11 +87,11 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
int pos;
TQString cutname = urlToConvert.path();
TQString cutdir = baseURL.path(1);
- while ( (pos = cutname.find("../")) >=0 )
+ while ( (pos = cutname.tqfind("../")) >=0 )
{
cutname.remove( 0, pos+3 );
cutdir.remove( cutdir.length()-1, 1 );
- cutdir.remove( cutdir.findRev('/')+1 , 1000);
+ cutdir.remove( cutdir.tqfindRev('/')+1 , 1000);
}
resultURL.setPath(TQDir::cleanDirPath(cutdir+cutname));
}
@@ -105,27 +105,27 @@ KURL QExtFileInfo::toAbsolute(const KURL& urlToConvert,const KURL& baseURL)
This is needed for empty directory adding/handling. (Andras)
Currently works only for local directories
*/
-KURL::List QExtFileInfo::allFiles( const KURL& path, const TQString& mask)
+KURL::List TQExtFileInfo::allFiles( const KURL& path, const TQString& tqmask)
{
- QExtFileInfo internalFileInfo;
- return internalFileInfo.allFilesInternal(path, mask);
+ TQExtFileInfo internalFileInfo;
+ return internalFileInfo.allFilesInternal(path, tqmask);
}
-KURL::List QExtFileInfo::allFilesRelative( const KURL& path, const TQString& mask)
+KURL::List TQExtFileInfo::allFilesRelative( const KURL& path, const TQString& tqmask)
{
- QExtFileInfo internalFileInfo;
- KURL::List r = internalFileInfo.allFilesInternal( path, mask);
+ TQExtFileInfo internalFileInfo;
+ KURL::List r = internalFileInfo.allFilesInternal( path, tqmask);
KURL::List::Iterator it;
for ( it = r.begin(); it != r.end(); ++it )
{
- *it = QExtFileInfo::toRelative( *it, path );
+ *it = TQExtFileInfo::toRelative( *it, path );
}
return r;
}
-bool QExtFileInfo::createDir( const KURL& path )
+bool TQExtFileInfo::createDir( const KURL& path )
{
int i=0;
bool result;
@@ -150,7 +150,7 @@ bool QExtFileInfo::createDir( const KURL& path )
return result;
}
-KURL QExtFileInfo::cdUp(const KURL &url)
+KURL TQExtFileInfo::cdUp(const KURL &url)
{
KURL u = url;
TQString dir = u.path(-1);
@@ -162,17 +162,17 @@ KURL QExtFileInfo::cdUp(const KURL &url)
return u;
}
-TQString QExtFileInfo::shortName(const TQString &fname)
+TQString TQExtFileInfo::shortName(const TQString &fname)
{
return fname.section("/",-1);
}
-KURL QExtFileInfo::path( const KURL &url )
+KURL TQExtFileInfo::path( const KURL &url )
{
return KURL( url.directory(false,false) );
}
-KURL QExtFileInfo::home()
+KURL TQExtFileInfo::home()
{
KURL url;
url.setPath(TQDir::currentDirPath()+"/");
@@ -180,7 +180,7 @@ KURL QExtFileInfo::home()
}
-bool QExtFileInfo::exists(const KURL& a_url)
+bool TQExtFileInfo::exists(const KURL& a_url)
{
// Andras: Don't use it now, as it brings up an extra dialog and need manual
// intervention when usign fish
@@ -192,21 +192,21 @@ bool QExtFileInfo::exists(const KURL& a_url)
return TQFile::exists( a_url.path() );
} else
{
- QExtFileInfo internalFileInfo;
+ TQExtFileInfo internalFileInfo;
return internalFileInfo.internalExists(a_url);
}
}
/* Synchronouse copy, like NetAccess::file_copy in KDE 3.2 */
-bool QExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
+bool TQExtFileInfo::copy( const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window )
{
- QExtFileInfo internalFileInfo;
+ TQExtFileInfo internalFileInfo;
return internalFileInfo.internalCopy( src, target, permissions, overwrite, resume, window );
}
/** No descriptions */
-KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& mask)
+KURL::List TQExtFileInfo::allFilesInternal(const KURL& startURL, const TQString& tqmask)
{
dirListItems.clear();
if (internalExists(startURL))
@@ -214,7 +214,7 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString&
lstFilters.setAutoDelete(true);
lstFilters.clear();
// Split on white space
- TQStringList list = TQStringList::split( ' ', mask );
+ TQStringList list = TQStringList::split( ' ', tqmask );
for ( TQStringList::Iterator it = list.begin(); it != list.end(); ++it )
lstFilters.append( new TQRegExp(*it, false, true ) );
@@ -240,10 +240,10 @@ KURL::List QExtFileInfo::allFilesInternal(const KURL& startURL, const TQString&
//Some hackery from KIO::NetAccess as they do not do exactly what we want
/* return true if the url exists*/
-bool QExtFileInfo::internalExists(const KURL& url)
+bool TQExtFileInfo::internalExists(const KURL& url)
{
bJobOK = true;
- // kdDebug(24000)<<"QExtFileInfo::internalExists"<<endl;
+ // kdDebug(24000)<<"TQExtFileInfo::internalExists"<<endl;
KIO::StatJob * job = KIO::stat( url, false);
job->setDetails(0);
job->setSide(false); //check the url for writing
@@ -252,13 +252,13 @@ bool QExtFileInfo::internalExists(const KURL& url)
//To avoid lock-ups, start a timer.
TQTimer::singleShot(10*1000, this,TQT_SLOT(slotTimeout()));
-// kdDebug(24000)<<"QExtFileInfo::internalExists:before enter_loop"<<endl;
+// kdDebug(24000)<<"TQExtFileInfo::internalExists:before enter_loop"<<endl;
enter_loop();
-// kdDebug(24000)<<"QExtFileInfo::internalExists:after enter_loop"<<endl;
+// kdDebug(24000)<<"TQExtFileInfo::internalExists:after enter_loop"<<endl;
return bJobOK;
}
-bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
+bool TQExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permissions,
bool overwrite, bool resume, TQWidget* window)
{
bJobOK = true; // success unless further error occurs
@@ -277,18 +277,18 @@ bool QExtFileInfo::internalCopy(const KURL& src, const KURL& target, int permiss
void qt_enter_modal( TQWidget *widget );
void qt_leave_modal( TQWidget *widget );
-void QExtFileInfo::enter_loop()
+void TQExtFileInfo::enter_loop()
{
TQWidget dummy(0,0,WType_Dialog | WShowModal);
- dummy.setFocusPolicy( TQWidget::NoFocus );
+ dummy.setFocusPolicy( TQ_NoFocus );
qt_enter_modal(&dummy);
-// kdDebug(24000)<<"QExtFileInfo::enter_loop:before qApp->enter_loop()"<<endl;
- qApp->enter_loop();
-// kdDebug(24000)<<"QExtFileInfo::enter_loop:after qApp->enter_loop()"<<endl;
+// kdDebug(24000)<<"TQExtFileInfo::enter_loop:before tqApp->enter_loop()"<<endl;
+ tqApp->enter_loop();
+// kdDebug(24000)<<"TQExtFileInfo::enter_loop:after tqApp->enter_loop()"<<endl;
qt_leave_modal(&dummy);
}
-void QExtFileInfo::slotResult( KIO::Job * job )
+void TQExtFileInfo::slotResult( KIO::Job * job )
{
bJobOK = !job->error();
if ( !bJobOK )
@@ -298,14 +298,14 @@ void QExtFileInfo::slotResult( KIO::Job * job )
}
if ( job->isA("KIO::StatJob") )
m_entry = static_cast<KIO::StatJob *>(job)->statResult();
- qApp->exit_loop();
+ tqApp->exit_loop();
}
-void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
+void TQExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsList)
{
KURL url = static_cast<KIO::ListJob *>(job)->url();
url.adjustPath(-1);
- // avoid creating these QStrings again and again
+ // avoid creating these TQStrings again and again
static const TQString& dot = KGlobal::staticQString(".");
static const TQString& dotdot = KGlobal::staticQString("..");
@@ -339,9 +339,9 @@ void QExtFileInfo::slotNewEntries(KIO::Job *job, const KIO::UDSEntryList& udsLis
}
/** Timeout occured while waiting for some network function to return. */
-void QExtFileInfo::slotTimeout()
+void TQExtFileInfo::slotTimeout()
{
bJobOK = false;
- qApp->exit_loop();
+ tqApp->exit_loop();
}
#include "qextfileinfo.moc"
diff --git a/kimagemapeditor/qextfileinfo.h b/kimagemapeditor/qextfileinfo.h
index 6f2b867c..7842e338 100644
--- a/kimagemapeditor/qextfileinfo.h
+++ b/kimagemapeditor/qextfileinfo.h
@@ -9,8 +9,8 @@
(at your option) any later version.
*/
-#ifndef _QEXTFILEINFO_H_
-#define _QEXTFILEINFO_H_
+#ifndef _TQEXTFILEINFO_H_
+#define _TQEXTFILEINFO_H_
#include <kio/global.h>
#include <kio/job.h>
@@ -21,20 +21,21 @@
#include <tqptrlist.h>
#include <tqregexp.h>
-class QExtFileInfo:public QObject
+class TQExtFileInfo:public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
- QExtFileInfo() {};
- ~QExtFileInfo() {};
+ TQExtFileInfo() {};
+ ~TQExtFileInfo() {};
/** create to ralative short name */
static KURL toRelative(const KURL& urlToConvert,const KURL& baseURL);
/** convert relative filename to absolute */
static KURL toAbsolute(const KURL& urlToConvert,const KURL& baseURL);
/** recurse function for all files in dir */
- static KURL::List allFiles( const KURL& path, const TQString &mask);
- static KURL::List allFilesRelative( const KURL& path, const TQString &mask);
+ static KURL::List allFiles( const KURL& path, const TQString &tqmask);
+ static KURL::List allFilesRelative( const KURL& path, const TQString &tqmask);
/** create dir if don't exists */
static bool createDir(const KURL & path );
static KURL cdUp(const KURL &dir);
@@ -59,7 +60,7 @@ private:
TQPtrList<TQRegExp> lstFilters;
/** No descriptions */
- KURL::List allFilesInternal(const KURL& startURL, const TQString& mask);
+ KURL::List allFilesInternal(const KURL& startURL, const TQString& tqmask);
// friend class I_like_this_class;