From f008adb5a77e094eaf6abf3fc0f36958e66896a5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 25 Jun 2011 05:28:35 +0000 Subject: TQt4 port koffice This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../tools/defaulttools/kis_tool_duplicate.cc | 64 +++++++++++----------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'krita/plugins/tools/defaulttools/kis_tool_duplicate.cc') diff --git a/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc b/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc index 71678e6f..bd03245d 100644 --- a/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc +++ b/krita/plugins/tools/defaulttools/kis_tool_duplicate.cc @@ -18,10 +18,10 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -#include -#include -#include -#include +#include +#include +#include +#include #include #include @@ -46,7 +46,7 @@ #include "kis_boundary_painter.h" KisToolDuplicate::KisToolDuplicate() - : super(i18n("Duplicate Brush")), m_isOffsetNotUptodate(true), m_position(QPoint(-1,-1)) + : super(i18n("Duplicate Brush")), m_isOffsetNotUptodate(true), m_position(TQPoint(-1,-1)) { setName("tool_duplicate"); m_subject = 0; @@ -59,7 +59,7 @@ KisToolDuplicate::~KisToolDuplicate() void KisToolDuplicate::activate() { - m_position = QPoint(-1,-1); + m_position = TQPoint(-1,-1); super::activate(); if( m_subject->currentImg()->perspectiveGrid()->countSubGrids() != 1 ) { @@ -76,7 +76,7 @@ void KisToolDuplicate::buttonPress(KisButtonPressEvent *e) m_position = e->pos(); m_isOffsetNotUptodate = true; } else { - if (m_position != QPoint(-1, -1)) { + if (m_position != TQPoint(-1, -1)) { super::buttonPress(e); } } @@ -89,8 +89,8 @@ void KisToolDuplicate::setup(KActionCollection *collection) if (m_action == 0) { m_action = new KRadioAction(i18n("&Duplicate Brush"), - "tool_duplicate", Qt::Key_C, this, - SLOT(activate()), collection, + "tool_duplicate", TQt::Key_C, this, + TQT_SLOT(activate()), collection, name()); m_action->setToolTip(i18n("Duplicate parts of the image. Shift-click to select the point to duplicate from to begin.")); m_action->setExclusiveGroup("tools"); @@ -100,7 +100,7 @@ void KisToolDuplicate::setup(KActionCollection *collection) void KisToolDuplicate::initPaint(KisEvent *e) { - if( m_position != QPoint(-1,-1)) + if( m_position != TQPoint(-1,-1)) { if(m_isOffsetNotUptodate) { @@ -124,10 +124,10 @@ void KisToolDuplicate::move(KisMoveEvent *e) { // Paint the outline where we will (or are) copying from - if( m_position == QPoint(-1,-1) ) + if( m_position == TQPoint(-1,-1) ) return; - QPoint srcPos; + TQPoint srcPos; if (m_mode == PAINT) { // if we are in perspective correction mode, update the offset when moving if(m_perspectiveCorrection->isChecked()) @@ -147,7 +147,7 @@ void KisToolDuplicate::move(KisMoveEvent *e) // First look for the grid corresponding to the start point KisSubPerspectiveGrid* subGridStart = *m_subject->currentImg()->perspectiveGrid()->begin();//device->image()->perspectiveGrid()->gridAt(KisPoint(srcPoint.x() +hotSpot.x(),srcPoint.y() +hotSpot.y())); - QRect r = QRect(0,0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); + TQRect r = TQRect(0,0, m_subject->currentImg()->width(), m_subject->currentImg()->height()); if(subGridStart) { @@ -182,26 +182,26 @@ void KisToolDuplicate::move(KisMoveEvent *e) KisPoint duplicateStartPoisitionT = KisPerspectiveMath::matProd(endM, m_positionStartPainting - m_offset); KisPoint duplicateRealPosition = KisPerspectiveMath::matProd(startM, duplicateStartPoisitionT + (currentPositionT - positionStartPaintingT) ); KisPoint p = e->pos() - duplicateRealPosition; - srcPos = p.floorQPoint(); + srcPos = p.floorTQPoint(); } }else { - srcPos = painter()->duplicateOffset().floorQPoint(); + srcPos = painter()->duplicateOffset().floorTQPoint(); } } else { if(m_isOffsetNotUptodate) - srcPos = e->pos().floorQPoint() - m_position.floorQPoint(); + srcPos = e->pos().floorTQPoint() - m_position.floorTQPoint(); else - srcPos = m_offset.floorQPoint(); + srcPos = m_offset.floorTQPoint(); } - Q_INT32 x; - Q_INT32 y; + TQ_INT32 x; + TQ_INT32 y; // like KisPaintOp::splitCoordinate - x = (Q_INT32)((e->x() < 0) ? e->x() - 1 : e->x()); - y = (Q_INT32)((e->y() < 0) ? e->y() - 1 : e->y()); - srcPos = QPoint(x - srcPos.x(), y - srcPos.y()); + x = (TQ_INT32)((e->x() < 0) ? e->x() - 1 : e->x()); + y = (TQ_INT32)((e->y() < 0) ? e->y() - 1 : e->y()); + srcPos = TQPoint(x - srcPos.x(), y - srcPos.y()); paintOutline(srcPos); super::move(e); @@ -212,7 +212,7 @@ void KisToolDuplicate::paintAt(const KisPoint &pos, const double xtilt, const double ytilt) { - if( m_position != QPoint(-1,-1)) + if( m_position != TQPoint(-1,-1)) { if(m_isOffsetNotUptodate) { @@ -226,29 +226,29 @@ void KisToolDuplicate::paintAt(const KisPoint &pos, } } -QString KisToolDuplicate::quickHelp() const { +TQString KisToolDuplicate::quickHelp() const { return i18n("To start, shift-click on the place you want to duplicate from. Then you can start painting. An indication of where you are copying from will be displayed while drawing and moving the mouse."); } -QWidget* KisToolDuplicate::createOptionWidget(QWidget* parent) +TQWidget* KisToolDuplicate::createOptionWidget(TQWidget* tqparent) { - QWidget* widget = KisToolPaint::createOptionWidget(parent); - m_healing = new QCheckBox(widget); + TQWidget* widget = KisToolPaint::createOptionWidget(tqparent); + m_healing = new TQCheckBox(widget); m_healing->setChecked( false); - addOptionWidgetOption(m_healing, new QLabel(i18n("Healing"), widget )); + addOptionWidgetOption(m_healing, new TQLabel(i18n("Healing"), widget )); m_healingRadius = new KIntNumInput(widget); KisBrush *brush = m_subject->currentBrush(); int healingradius = 20; if( brush ) { - healingradius = 2 * QMAX(brush->width(),brush->height()); + healingradius = 2 * TQMAX(brush->width(),brush->height()); } m_healingRadius->setValue( healingradius ); - addOptionWidgetOption(m_healingRadius, new QLabel(i18n("Healing radius"), widget )); - m_perspectiveCorrection = new QCheckBox(widget); - addOptionWidgetOption(m_perspectiveCorrection, new QLabel(i18n("Correct the perspective"), widget )); + addOptionWidgetOption(m_healingRadius, new TQLabel(i18n("Healing radius"), widget )); + m_perspectiveCorrection = new TQCheckBox(widget); + addOptionWidgetOption(m_perspectiveCorrection, new TQLabel(i18n("Correct the perspective"), widget )); return widget; } -- cgit v1.2.1