summaryrefslogtreecommitdiffstats
path: root/kimagemapeditor/imagemap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kimagemapeditor/imagemap.cpp')
-rw-r--r--kimagemapeditor/imagemap.cpp38
1 files changed, 19 insertions, 19 deletions
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) {