diff options
Diffstat (limited to 'kmag/kmagzoomview.cpp')
-rw-r--r-- | kmag/kmagzoomview.cpp | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/kmag/kmagzoomview.cpp b/kmag/kmagzoomview.cpp index 644e91a..921465e 100644 --- a/kmag/kmagzoomview.cpp +++ b/kmag/kmagzoomview.cpp @@ -133,10 +133,10 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) m_invert(false), m_fitToWindow(true) { - TDEApplication::setGlobalMouseTracking(TRUE); - viewport()->setMouseTracking(TRUE); + TDEApplication::setGlobalMouseTracking(true); + viewport()->setMouseTracking(true); viewport()->setBackgroundMode (NoBackground); - viewport()->setFocusPolicy(TQ_StrongFocus); + viewport()->setFocusPolicy(TQWidget::StrongFocus); m_ctrlKeyPressed = false; m_shiftKeyPressed = false; @@ -147,12 +147,12 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) setRefreshRate(10); // connect it to grabFrame() - connect(&m_grabTimer, TQT_SIGNAL(timeout()), TQT_SLOT(grabFrame())); + connect(&m_grabTimer, TQ_SIGNAL(timeout()), TQ_SLOT(grabFrame())); // start the grabTimer m_grabTimer.start(static_cast<int>(1000.0/m_fps)); // connect it to updateMouseView() - connect(&m_mouseViewTimer, TQT_SIGNAL(timeout()), TQT_SLOT(updateMouseView())); + connect(&m_mouseViewTimer, TQ_SIGNAL(timeout()), TQ_SLOT(updateMouseView())); // start the grabTimer @ 25 frames per second! m_mouseViewTimer.start(25); @@ -167,7 +167,7 @@ KMagZoomView::KMagZoomView(TQWidget *parent, const char *name) KMagZoomView::~KMagZoomView() { - TDEApplication::setGlobalMouseTracking(FALSE); + TDEApplication::setGlobalMouseTracking(false); } /** @@ -246,7 +246,7 @@ void KMagZoomView::drawContents ( TQPainter * p, int clipx, int clipy, int clipw // show the pixel under mouse cursor if(m_showMouse) { // paint the mouse cursor - paintMouseCursor(TQT_TQPAINTDEVICE(&clippedPixmap), calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y())); + paintMouseCursor(&clippedPixmap, calcMousePos (m_refreshSwitch)-TQPoint (areaToPaint.x(), areaToPaint.y())); } TQPixmap zoomedPixmap; @@ -294,8 +294,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) pz.setPen(TQt::black); pz.setBackgroundColor(TQt::white); - TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE ); - TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE ); + TQBitmap sCursor( 16, 16, left_ptr_bits, true ); + TQBitmap mask( 16, 16, left_ptrmsk_bits, true ); sCursor.setMask(mask); // since hot spot is at 3,1 @@ -307,7 +307,7 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) { // 3. Actual cursor // Get the current cursor type - TQWidget *dummy = TDEApplication::widgetAt(TQCursor::pos(), FALSE); + TQWidget *dummy = TDEApplication::widgetAt(TQCursor::pos(), false); if(!dummy) break; kdDebug() << ">" << dummy->name() << ":" << dummy->cursor().shape() << "-" << endl; @@ -318,8 +318,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) pz.setPen(TQt::black); pz.setBackgroundColor(TQt::white); - TQBitmap sCursor( 16, 16, left_ptr_bits, TRUE ); - TQBitmap mask( 16, 16, left_ptrmsk_bits, TRUE ); + TQBitmap sCursor( 16, 16, left_ptr_bits, true ); + TQBitmap mask( 16, 16, left_ptrmsk_bits, true ); sCursor.setMask(mask); // since hot spot is at 3,1 @@ -327,8 +327,8 @@ void KMagZoomView::paintMouseCursor(TQPaintDevice *dev, TQPoint mousePos) } break; default: - TQBitmap sCursor( 32, 32, phand_bits, TRUE ); - TQBitmap mask( 32, 32, phandm_bits, TRUE ); + TQBitmap sCursor( 32, 32, phand_bits, true ); + TQBitmap mask( 32, 32, phandm_bits, true ); sCursor.setMask(mask); pz.drawPixmap(mousePos.x(), mousePos.y(), sCursor); @@ -370,7 +370,7 @@ TQPoint KMagZoomView::calcMousePos(bool updateMousePos) void KMagZoomView::mousePressEvent(TQMouseEvent *e) { switch(e->button()) { - case Qt::LeftButton : + case TQt::LeftButton : if(m_ctrlKeyPressed) { // check if currently in resize mode // don't do anything if fitToWindow is enabled @@ -443,7 +443,7 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) } break; - case Qt::MidButton : + case TQt::MidButton : // check if currently in move mode // don't do anything if follow mouse is enabled if ((m_mouseMode != MoveSelection) && !m_followMouse) { @@ -484,8 +484,8 @@ void KMagZoomView::mousePressEvent(TQMouseEvent *e) void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) { switch(e->button()) { - case Qt::LeftButton : - case Qt::MidButton : + case TQt::LeftButton : + case TQt::MidButton : // check if currently in move mode if(m_mouseMode == MoveSelection) { // hide the selection window @@ -521,9 +521,9 @@ void KMagZoomView::mouseReleaseEvent(TQMouseEvent *e) } break; - case Qt::RightButton : + case TQt::RightButton : break; - case Qt::NoButton : + case TQt::NoButton : break; // do nothing @@ -686,7 +686,7 @@ void KMagZoomView::contextMenuEvent (TQContextMenuEvent *e) void KMagZoomView::focusOutEvent(TQFocusEvent *e) { - if(e->lostFocus() == TRUE) { + if (e->lostFocus()) { m_ctrlKeyPressed = false; m_shiftKeyPressed = false; } @@ -889,7 +889,7 @@ TQPixmap KMagZoomView::getPixmap() TQPixmap mousePixmap(m_grabbedPixmap); // paint the mouse cursor w/o updating to a newer position - paintMouseCursor(TQT_TQPAINTDEVICE(&mousePixmap), calcMousePos(false)); + paintMouseCursor(&mousePixmap, calcMousePos(false)); return(mousePixmap); } else { // no mouse cursor |