diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-05 11:54:26 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2023-11-16 23:40:13 +0900 |
commit | c8c5e11f05f023849896d09cf06917e9a2c016ca (patch) | |
tree | a62f00b0249b967528e115e2123b56d40633c17a /chalk/ui/kis_canvas.cpp | |
parent | c9973bfbf1091ef91f30b5ab456015676123aa47 (diff) | |
download | koffice-c8c5e11f05f023849896d09cf06917e9a2c016ca.tar.gz koffice-c8c5e11f05f023849896d09cf06917e9a2c016ca.zip |
Replace Qt with TQt
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit ef06f14f2475bd08d3ea2ceec54a7b2238f3554e)
Diffstat (limited to 'chalk/ui/kis_canvas.cpp')
-rw-r--r-- | chalk/ui/kis_canvas.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/chalk/ui/kis_canvas.cpp b/chalk/ui/kis_canvas.cpp index f001c5bdb..1128d9f2a 100644 --- a/chalk/ui/kis_canvas.cpp +++ b/chalk/ui/kis_canvas.cpp @@ -169,16 +169,16 @@ void KisCanvasWidget::widgetGotTabletEvent(TQTabletEvent *e) double pressure = e->pressure() / 255.0; if (e->type() == TQEvent::TabletPress) { - KisButtonPressEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), Qt::LeftButton, Qt::NoButton); + KisButtonPressEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), TQt::LeftButton, TQt::NoButton); translateTabletEvent(&ke); } else if (e->type() == TQEvent::TabletRelease) { - KisButtonReleaseEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), Qt::LeftButton, Qt::NoButton); + KisButtonReleaseEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), TQt::LeftButton, TQt::NoButton); translateTabletEvent(&ke); } else { - KisMoveEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), Qt::NoButton); + KisMoveEvent ke(device, KisPoint(e->pos()), KisPoint(e->globalPos()), pressure, e->xTilt(), e->yTilt(), TQt::NoButton); translateTabletEvent(&ke); #ifdef Q_WS_X11 // Fix the problem that when you change from using a tablet device to the mouse, @@ -263,7 +263,7 @@ void KisCanvasWidget::translateTabletEvent(KisEvent *e) if (e->type() == KisEvent::ButtonPressEvent || e->type() == KisEvent::ButtonReleaseEvent) { KisButtonEvent *b = static_cast<KisButtonEvent *>(e); - if (b->button() == Qt::MidButton || b->button() == Qt::RightButton) { + if (b->button() == TQt::MidButton || b->button() == TQt::RightButton) { if (e->type() == KisEvent::ButtonPressEvent) { buttonPressEvent(static_cast<KisButtonPressEvent *>(e)); @@ -277,10 +277,10 @@ void KisCanvasWidget::translateTabletEvent(KisEvent *e) // Use pressure threshold to detect 'left button' press/release if (e->pressure() >= PRESSURE_THRESHOLD && m_lastPressure < PRESSURE_THRESHOLD) { - KisButtonPressEvent ke(e->device(), e->pos(), e->globalPos(), e->pressure(), e->xTilt(), e->yTilt(), Qt::LeftButton, e->state()); + KisButtonPressEvent ke(e->device(), e->pos(), e->globalPos(), e->pressure(), e->xTilt(), e->yTilt(), TQt::LeftButton, e->state()); buttonPressEvent(&ke); } else if (e->pressure() < PRESSURE_THRESHOLD && m_lastPressure >= PRESSURE_THRESHOLD) { - KisButtonReleaseEvent ke(e->device(), e->pos(), e->globalPos(), e->pressure(), e->xTilt(), e->yTilt(), Qt::LeftButton, e->state()); + KisButtonReleaseEvent ke(e->device(), e->pos(), e->globalPos(), e->pressure(), e->xTilt(), e->yTilt(), TQt::LeftButton, e->state()); buttonReleaseEvent(&ke); } else { if (!checkThresholdOnly) { @@ -417,11 +417,11 @@ TQt::ButtonState KisCanvasWidget::translateX11ButtonState(int state) int buttonState = 0; if (state & Button1Mask) - buttonState |= Qt::LeftButton; + buttonState |= TQt::LeftButton; if (state & Button2Mask) - buttonState |= Qt::MidButton; + buttonState |= TQt::MidButton; if (state & Button3Mask) - buttonState |= Qt::RightButton; + buttonState |= TQt::RightButton; if (state & ShiftMask) buttonState |= TQt::ShiftButton; if (state & ControlMask) @@ -440,16 +440,16 @@ TQt::ButtonState KisCanvasWidget::translateX11Button(unsigned int X11Button) switch (X11Button) { case Button1: - qtButton = Qt::LeftButton; + qtButton = TQt::LeftButton; break; case Button2: - qtButton = Qt::MidButton; + qtButton = TQt::MidButton; break; case Button3: - qtButton = Qt::RightButton; + qtButton = TQt::RightButton; break; default: - qtButton = Qt::NoButton; + qtButton = TQt::NoButton; } return qtButton; @@ -853,7 +853,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, TQ int state = translateX11ButtonState(motion.state); TQPoint pos(motion.x, motion.y); - TQMouseEvent e(TQEvent::MouseMove, pos, globalPos, Qt::NoButton, state); + TQMouseEvent e(TQEvent::MouseMove, pos, globalPos, TQt::NoButton, state); widgetGotMouseMoveEvent(&e); } @@ -911,7 +911,7 @@ bool KisCanvasWidget::x11Event(XEvent *event, Display *x11Display, WId winId, TQ deviceId = motion->deviceid; axisData = motion->axis_data; - button = Qt::NoButton; + button = TQt::NoButton; buttonState = translateX11ButtonState(motion->state); } else |