summaryrefslogtreecommitdiffstats
path: root/krita/plugins/tools/tool_crop/kis_tool_crop.cc
diff options
context:
space:
mode:
Diffstat (limited to 'krita/plugins/tools/tool_crop/kis_tool_crop.cc')
-rw-r--r--krita/plugins/tools/tool_crop/kis_tool_crop.cc200
1 files changed, 100 insertions, 100 deletions
diff --git a/krita/plugins/tools/tool_crop/kis_tool_crop.cc b/krita/plugins/tools/tool_crop/kis_tool_crop.cc
index fd83e204..763e19b1 100644
--- a/krita/plugins/tools/tool_crop/kis_tool_crop.cc
+++ b/krita/plugins/tools/tool_crop/kis_tool_crop.cc
@@ -21,13 +21,13 @@
*/
-#include <qcheckbox.h>
-#include <qcombobox.h>
-#include <qobject.h>
-#include <qpainter.h>
-#include <qpen.h>
-#include <qpushbutton.h>
-#include <qrect.h>
+#include <tqcheckbox.h>
+#include <tqcombobox.h>
+#include <tqobject.h>
+#include <tqpainter.h>
+#include <tqpen.h>
+#include <tqpushbutton.h>
+#include <tqrect.h>
#include <kdebug.h>
#include <kaction.h>
@@ -67,7 +67,7 @@ KisToolCrop::KisToolCrop()
setCursor(m_cropCursor);
m_subject = 0;
m_selecting = false;
- m_rectCrop = QRect(0, 0, 0, 0);
+ m_rectCrop = TQRect(0, 0, 0, 0);
m_handleSize = 13;
m_haveCropSelection = false;
m_optWidget = 0;
@@ -113,10 +113,10 @@ void KisToolCrop::deactivate()
void KisToolCrop::paint(KisCanvasPainter& gc)
{
- paintOutlineWithHandles(gc, QRect());
+ paintOutlineWithHandles(gc, TQRect());
}
-void KisToolCrop::paint(KisCanvasPainter& gc, const QRect& rc)
+void KisToolCrop::paint(KisCanvasPainter& gc, const TQRect& rc)
{
paintOutlineWithHandles(gc, rc);
}
@@ -133,7 +133,7 @@ void KisToolCrop::clearRect()
controller->kiscanvas()->update();
- m_rectCrop = QRect(0,0,0,0);
+ m_rectCrop = TQRect(0,0,0,0);
updateWidgetValues();
m_selecting = false;
@@ -147,8 +147,8 @@ void KisToolCrop::buttonPress(KisButtonPressEvent *e)
if (img && img->activeDevice() && e->button() == LeftButton) {
- QPoint pos = e->pos().floorQPoint();
- QRect b = img->bounds();
+ TQPoint pos = e->pos().floorTQPoint();
+ TQRect b = img->bounds();
if (pos.x() < b.x())
pos.setX(b.x());
@@ -164,7 +164,7 @@ void KisToolCrop::buttonPress(KisButtonPressEvent *e)
if( !m_haveCropSelection ) //if the selection is not set
{
- m_rectCrop = QRect( pos.x(), pos.y(), 0, 0);
+ m_rectCrop = TQRect( pos.x(), pos.y(), 0, 0);
paintOutlineWithHandles();
}
else
@@ -189,28 +189,28 @@ void KisToolCrop::move(KisMoveEvent *e)
{
paintOutlineWithHandles();
- m_rectCrop.setBottomRight( e->pos().floorQPoint());
+ m_rectCrop.setBottomRight( e->pos().floorTQPoint());
KisImageSP image = m_subject->currentImg();
- m_rectCrop.setRight( QMIN(m_rectCrop.right(), image->width()));
- m_rectCrop.setBottom( QMIN(m_rectCrop.bottom(), image->width()));
+ m_rectCrop.setRight( TQMIN(m_rectCrop.right(), image->width()));
+ m_rectCrop.setBottom( TQMIN(m_rectCrop.bottom(), image->width()));
m_rectCrop = m_rectCrop.normalize();
paintOutlineWithHandles();
}
else //if the crop selection is set
{
- m_dragStop = e->pos().floorQPoint();
+ m_dragStop = e->pos().floorTQPoint();
if (m_mouseOnHandleType != None && m_dragStart != m_dragStop ) {
- Q_INT32 imageWidth = m_subject->currentImg()->width();
- Q_INT32 imageHeight = m_subject->currentImg()->height();
+ TQ_INT32 imageWidth = m_subject->currentImg()->width();
+ TQ_INT32 imageHeight = m_subject->currentImg()->height();
paintOutlineWithHandles();
- QPoint pos = e->pos().floorQPoint();
+ TQPoint pos = e->pos().floorTQPoint();
if( m_mouseOnHandleType == Inside )
{
m_rectCrop.moveBy( ( m_dragStop.x() - m_dragStart.x() ), ( m_dragStop.y() - m_dragStart.y() ) );
@@ -232,35 +232,35 @@ void KisToolCrop::move(KisMoveEvent *e)
}
} else if(m_optWidget->boolRatio->isChecked())
{
- QPoint drag = m_dragStop - m_dragStart;
+ TQPoint drag = m_dragStop - m_dragStart;
if( ! m_optWidget->boolWidth->isChecked() && !m_optWidget->boolHeight->isChecked() )
{
switch (m_mouseOnHandleType)
{
case (UpperLeft):
{
- Q_INT32 dep = (drag.x() + drag.y()) / 2;
+ TQ_INT32 dep = (drag.x() + drag.y()) / 2;
m_rectCrop.setTop( m_rectCrop.top() + dep );
m_rectCrop.setLeft( (int) ( m_rectCrop.right() - m_optWidget->doubleRatio->value() * m_rectCrop.height() ) );
}
break;
case (LowerRight):
{
- Q_INT32 dep = (drag.x() + drag.y()) / 2;
+ TQ_INT32 dep = (drag.x() + drag.y()) / 2;
m_rectCrop.setBottom( m_rectCrop.bottom() + dep );
m_rectCrop.setWidth( (int) ( m_optWidget->doubleRatio->value() * m_rectCrop.height() ) );
break;
}
case (UpperRight):
{
- Q_INT32 dep = (drag.x() - drag.y()) / 2;
+ TQ_INT32 dep = (drag.x() - drag.y()) / 2;
m_rectCrop.setTop( m_rectCrop.top() - dep );
m_rectCrop.setWidth( (int) ( m_optWidget->doubleRatio->value() * m_rectCrop.height() ) );
break;
}
case (LowerLeft):
{
- Q_INT32 dep = (drag.x() - drag.y()) / 2;
+ TQ_INT32 dep = (drag.x() - drag.y()) / 2;
m_rectCrop.setBottom( m_rectCrop.bottom() - dep );
m_rectCrop.setLeft( (int) ( m_rectCrop.right() - m_optWidget->doubleRatio->value() * m_rectCrop.height() ) );
break;
@@ -359,8 +359,8 @@ void KisToolCrop::move(KisMoveEvent *e)
}
m_rectCrop = m_rectCrop.normalize();
- m_rectCrop = m_rectCrop.intersect( QRect(0,0, imageWidth + 1, imageHeight + 1 ) );
- m_dragStart = e->pos().floorQPoint();
+ m_rectCrop = m_rectCrop.intersect( TQRect(0,0, imageWidth + 1, imageHeight + 1 ) );
+ m_dragStart = e->pos().floorTQPoint();
paintOutlineWithHandles();
}
}
@@ -371,7 +371,7 @@ void KisToolCrop::move(KisMoveEvent *e)
if ( m_haveCropSelection ) //if the crop selection is set
{
KisCanvasController *controller = m_subject->canvasController();
- Q_INT32 type = mouseOnHandle(controller->windowToView(e->pos().floorQPoint()));
+ TQ_INT32 type = mouseOnHandle(controller->windowToView(e->pos().floorTQPoint()));
//set resize cursor if we are on one of the handles
setMoveResizeCursor(type);
}
@@ -381,7 +381,7 @@ void KisToolCrop::move(KisMoveEvent *e)
void KisToolCrop::updateWidgetValues(bool updateratio)
{
- QRect r = realRectCrop();
+ TQRect r = realRectCrop();
setOptionWidgetX(r.x());
setOptionWidgetY(r.y());
setOptionWidgetWidth(r.width() );
@@ -414,12 +414,12 @@ void KisToolCrop::validateSelection(bool updateratio)
KisImageSP image = m_subject->currentImg();
if (image) {
- Q_INT32 imageWidth = image->width();
- Q_INT32 imageHeight = image->height();
- m_rectCrop.setLeft(QMAX(0, m_rectCrop.left()));
- m_rectCrop.setTop(QMAX(0, m_rectCrop.top()));
- m_rectCrop.setRight(QMIN(imageWidth, m_rectCrop.right()));
- m_rectCrop.setBottom(QMIN(imageHeight, m_rectCrop.bottom()));
+ TQ_INT32 imageWidth = image->width();
+ TQ_INT32 imageHeight = image->height();
+ m_rectCrop.setLeft(TQMAX(0, m_rectCrop.left()));
+ m_rectCrop.setTop(TQMAX(0, m_rectCrop.top()));
+ m_rectCrop.setRight(TQMIN(imageWidth, m_rectCrop.right()));
+ m_rectCrop.setBottom(TQMIN(imageHeight, m_rectCrop.bottom()));
updateWidgetValues(updateratio);
}
@@ -432,36 +432,36 @@ void KisToolCrop::paintOutlineWithHandles()
KisCanvasController *controller = m_subject->canvasController();
KisCanvas *canvas = controller->kiscanvas();
KisCanvasPainter gc(canvas);
- QRect rc;
+ TQRect rc;
paintOutlineWithHandles(gc, rc);
}
}
-void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const QRect&)
+void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const TQRect&)
{
if (m_subject && (m_selecting || m_haveCropSelection)) {
KisCanvasController *controller = m_subject->canvasController();
RasterOp op = gc.rasterOp();
- QPen old = gc.pen();
- QPen pen(Qt::SolidLine);
+ TQPen old = gc.pen();
+ TQPen pen(TQt::SolidLine);
pen.setWidth(1);
- QPoint start;
- QPoint end;
+ TQPoint start;
+ TQPoint end;
Q_ASSERT(controller);
start = controller->windowToView(m_rectCrop.topLeft());
end = controller->windowToView(m_rectCrop.bottomRight());
- gc.setRasterOp(Qt::NotROP);
+ gc.setRasterOp(TQt::NotROP);
gc.setPen(pen);
//draw handles
- m_handlesRegion = handles(QRect(start, end));
+ m_handlesRegion = handles(TQRect(start, end));
- Q_INT32 startx;
- Q_INT32 starty;
- Q_INT32 endx;
- Q_INT32 endy;
+ TQ_INT32 startx;
+ TQ_INT32 starty;
+ TQ_INT32 endx;
+ TQ_INT32 endy;
if(start.x()<=end.x())
{
startx=start.x();
@@ -500,10 +500,10 @@ void KisToolCrop::paintOutlineWithHandles(KisCanvasPainter& gc, const QRect&)
gc.drawLine(startx,endy + m_handleSize / 2 + 1, startx, controller->kiscanvas()->height());
gc.drawLine(endx,0,endx,starty - m_handleSize / 2);
gc.drawLine(endx + m_handleSize / 2 + 1,starty, controller->kiscanvas()->width(), starty);
- QMemArray <QRect> rects = m_handlesRegion.rects ();
- for (QMemArray <QRect>::ConstIterator it = rects.begin (); it != rects.end (); ++it)
+ TQMemArray <TQRect> rects = m_handlesRegion.rects ();
+ for (TQMemArray <TQRect>::ConstIterator it = rects.begin (); it != rects.end (); ++it)
{
- gc.fillRect (*it, Qt::black);
+ gc.fillRect (*it, TQt::black);
}
@@ -523,12 +523,12 @@ void KisToolCrop::crop() {
if (!img)
return;
- QRect rc = realRectCrop().normalize();
+ TQRect rc = realRectCrop().normalize();
// The visitor adds the undo steps to the macro
if (m_optWidget->cmbType->currentItem() == 0) {
- QRect dirty = img->bounds();
+ TQRect dirty = img->bounds();
// The layer(s) under the current layer will take care of adding
// undo information to the Crop macro.
@@ -548,7 +548,7 @@ void KisToolCrop::crop() {
img->resize(rc, true);
}
- m_rectCrop = QRect(0,0,0,0);
+ m_rectCrop = TQRect(0,0,0,0);
updateWidgetValues();
}
@@ -660,7 +660,7 @@ void KisToolCrop::setRatio(double )
}
}
-void KisToolCrop::setOptionWidgetX(Q_INT32 x)
+void KisToolCrop::setOptionWidgetX(TQ_INT32 x)
{
// Disable signals otherwise we get the valueChanged signal, which we don't want
// to go through the logic for setting values that way.
@@ -669,21 +669,21 @@ void KisToolCrop::setOptionWidgetX(Q_INT32 x)
m_optWidget->intX->blockSignals(false);
}
-void KisToolCrop::setOptionWidgetY(Q_INT32 y)
+void KisToolCrop::setOptionWidgetY(TQ_INT32 y)
{
m_optWidget->intY->blockSignals(true);
m_optWidget->intY->setValue(y);
m_optWidget->intY->blockSignals(false);
}
-void KisToolCrop::setOptionWidgetWidth(Q_INT32 x)
+void KisToolCrop::setOptionWidgetWidth(TQ_INT32 x)
{
m_optWidget->intWidth->blockSignals(true);
m_optWidget->intWidth->setValue(x);
m_optWidget->intWidth->blockSignals(false);
}
-void KisToolCrop::setOptionWidgetHeight(Q_INT32 y)
+void KisToolCrop::setOptionWidgetHeight(TQ_INT32 y)
{
m_optWidget->intHeight->blockSignals(true);
m_optWidget->intHeight->setValue(y);
@@ -698,23 +698,23 @@ void KisToolCrop::setOptionWidgetRatio(double ratio)
}
-QWidget* KisToolCrop::createOptionWidget(QWidget* parent)
+TQWidget* KisToolCrop::createOptionWidget(TQWidget* tqparent)
{
- m_optWidget = new WdgToolCrop(parent);
+ m_optWidget = new WdgToolCrop(tqparent);
Q_CHECK_PTR(m_optWidget);
- connect(m_optWidget->bnCrop, SIGNAL(clicked()), this, SLOT(crop()));
+ connect(m_optWidget->bnCrop, TQT_SIGNAL(clicked()), this, TQT_SLOT(crop()));
- connect(m_optWidget->intX, SIGNAL(valueChanged(int)), this, SLOT(setCropX(int)));
- connect(m_optWidget->intY, SIGNAL(valueChanged(int)), this, SLOT(setCropY(int)));
- connect(m_optWidget->intWidth, SIGNAL(valueChanged(int)), this, SLOT(setCropWidth(int)));
- connect(m_optWidget->intHeight, SIGNAL(valueChanged(int)), this, SLOT(setCropHeight(int)));
- connect(m_optWidget->doubleRatio, SIGNAL(valueChanged(double)), this, SLOT(setRatio( double )));
+ connect(m_optWidget->intX, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropX(int)));
+ connect(m_optWidget->intY, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropY(int)));
+ connect(m_optWidget->intWidth, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropWidth(int)));
+ connect(m_optWidget->intHeight, TQT_SIGNAL(valueChanged(int)), this, TQT_SLOT(setCropHeight(int)));
+ connect(m_optWidget->doubleRatio, TQT_SIGNAL(valueChanged(double)), this, TQT_SLOT(setRatio( double )));
return m_optWidget;
}
-QWidget* KisToolCrop::optionWidget()
+TQWidget* KisToolCrop::optionWidget()
{
return m_optWidget;
}
@@ -728,7 +728,7 @@ void KisToolCrop::setup(KActionCollection *collection)
"tool_crop",
0,
this,
- SLOT(activate()),
+ TQT_SLOT(activate()),
collection,
name());
Q_CHECK_PTR(m_action);
@@ -740,31 +740,31 @@ void KisToolCrop::setup(KActionCollection *collection)
}
}
-QRect toQRect(double x, double y, int w, int h)
+TQRect toTQRect(double x, double y, int w, int h)
{
- return QRect(int(x), int(y), w, h);
+ return TQRect(int(x), int(y), w, h);
}
-QRegion KisToolCrop::handles(QRect rect)
+TQRegion KisToolCrop::handles(TQRect rect)
{
- QRegion handlesRegion;
+ TQRegion handlesRegion;
//add handle at the lower right corner
- handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0, QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0, TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize );
//add handle at the upper right corner
- handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize );
//add rectangle at the lower left corner
- handlesRegion += toQRect( 0 - m_handleSize / 2.0 , QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( 0 - m_handleSize / 2.0 , TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize );
//add rectangle at the upper left corner
- handlesRegion += toQRect( 0 - m_handleSize / 2.0, 0 - m_handleSize / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( 0 - m_handleSize / 2.0, 0 - m_handleSize / 2.0, m_handleSize, m_handleSize );
//add handle at the lower edge of the rectangle
- handlesRegion += toQRect( ( QABS( rect.width() ) - m_handleSize ) / 2.0 , QABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( ( TQABS( rect.width() ) - m_handleSize ) / 2.0 , TQABS( rect.height() ) - m_handleSize / 2.0, m_handleSize, m_handleSize );
//add handle at the right edge of the rectangle
- handlesRegion += toQRect( QABS( rect.width() ) - m_handleSize / 2.0 , ( QABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( TQABS( rect.width() ) - m_handleSize / 2.0 , ( TQABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize );
//add handle at the upper edge of the rectangle
- handlesRegion += toQRect( ( QABS( rect.width() ) - m_handleSize ) / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( ( TQABS( rect.width() ) - m_handleSize ) / 2.0 , 0 - m_handleSize / 2.0, m_handleSize, m_handleSize );
//add handle at the left edge of the rectangle
- handlesRegion += toQRect( 0 - m_handleSize / 2.0, ( QABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize );
+ handlesRegion += toTQRect( 0 - m_handleSize / 2.0, ( TQABS( rect.height() ) - m_handleSize ) / 2.0, m_handleSize, m_handleSize );
//move the handles to the correct position
if( rect.width() >= 0 && rect.height() >= 0)
@@ -773,30 +773,30 @@ QRegion KisToolCrop::handles(QRect rect)
}
else if( rect.width() < 0 && rect.height() >= 0)
{
- handlesRegion.translate ( rect.x() - QABS( rect.width() ), rect.y() );
+ handlesRegion.translate ( rect.x() - TQABS( rect.width() ), rect.y() );
}
else if( rect.width() >= 0 && rect.height() < 0)
{
- handlesRegion.translate ( rect.x(), rect.y() - QABS( rect.height() ) );
+ handlesRegion.translate ( rect.x(), rect.y() - TQABS( rect.height() ) );
}
else if( rect.width() < 0 && rect.height() < 0)
{
- handlesRegion.translate ( rect.x() - QABS( rect.width() ), rect.y() - QABS( rect.height() ) );
+ handlesRegion.translate ( rect.x() - TQABS( rect.width() ), rect.y() - TQABS( rect.height() ) );
}
return handlesRegion;
}
-Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
+TQ_INT32 KisToolCrop::mouseOnHandle(TQPoint currentViewPoint)
{
KisCanvasController *controller = m_subject->canvasController();
Q_ASSERT(controller);
- QPoint start = controller->windowToView(m_rectCrop.topLeft());
- QPoint end = controller->windowToView(m_rectCrop.bottomRight());
+ TQPoint start = controller->windowToView(m_rectCrop.topLeft());
+ TQPoint end = controller->windowToView(m_rectCrop.bottomRight());
- Q_INT32 startx;
- Q_INT32 starty;
- Q_INT32 endx;
- Q_INT32 endy;
+ TQ_INT32 startx;
+ TQ_INT32 starty;
+ TQ_INT32 endx;
+ TQ_INT32 endy;
if(start.x()<=end.x())
{
startx=start.x();
@@ -818,7 +818,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
endy=start.y();
}
- if ( toQRect ( startx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ if ( toTQRect ( startx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -827,7 +827,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return UpperLeft;
}
- else if ( toQRect ( startx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( startx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -836,7 +836,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return LowerLeft;
}
- else if ( toQRect ( endx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( endx - m_handleSize / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -845,7 +845,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return UpperRight;
}
- else if ( toQRect ( endx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( endx - m_handleSize / 2.0, endy - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -854,7 +854,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return LowerRight;
}
- else if ( toQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, starty - m_handleSize / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -862,7 +862,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return Upper;
}
- else if ( toQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, endy - m_handleSize / 2, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( startx + ( endx - startx - m_handleSize ) / 2.0, endy - m_handleSize / 2, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -870,7 +870,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return Lower;
}
- else if ( toQRect ( startx - m_handleSize / 2.0, starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( startx - m_handleSize / 2.0, starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -878,7 +878,7 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return Left;
}
- else if ( toQRect ( endx - m_handleSize / 2.0 , starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).contains( currentViewPoint ) )
+ else if ( toTQRect ( endx - m_handleSize / 2.0 , starty + ( endy - starty - m_handleSize ) / 2.0, m_handleSize, m_handleSize ).tqcontains( currentViewPoint ) )
{
if( !m_selecting )
{
@@ -886,14 +886,14 @@ Q_INT32 KisToolCrop::mouseOnHandle(QPoint currentViewPoint)
}
return Right;
}
- else if ( toQRect ( startx , starty, endx - startx , endy - starty ).contains( currentViewPoint ) )
+ else if ( toTQRect ( startx , starty, endx - startx , endy - starty ).tqcontains( currentViewPoint ) )
{
return Inside;
}
else return None;
}
-void KisToolCrop::setMoveResizeCursor (Q_INT32 handle)
+void KisToolCrop::setMoveResizeCursor (TQ_INT32 handle)
{
switch (handle)
{