From e69e8b1d09fb579316595b4e6a850e717358a8b1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 19 Jun 2011 19:03:33 +0000 Subject: TQt4 port kdegraphics This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdegraphics@1237557 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kghostview/kgvpageview.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'kghostview/kgvpageview.cpp') diff --git a/kghostview/kgvpageview.cpp b/kghostview/kgvpageview.cpp index 2cc5f7e6..577a8c98 100644 --- a/kghostview/kgvpageview.cpp +++ b/kghostview/kgvpageview.cpp @@ -22,13 +22,13 @@ #include "kgvpageview.h" -KGVPageView::KGVPageView( TQWidget* parent, const char* name ) - : TQScrollView( parent, name ) +KGVPageView::KGVPageView( TQWidget* tqparent, const char* name ) + : TQScrollView( tqparent, name ) { _page = 0; - setFocusPolicy( TQWidget::StrongFocus ); - viewport()->setFocusPolicy( TQWidget::WheelFocus ); + setFocusPolicy( TQ_StrongFocus ); + viewport()->setFocusPolicy( TQ_WheelFocus ); } void KGVPageView::setPage( TQWidget* page ) @@ -52,7 +52,7 @@ bool KGVPageView::atBottom() const bool KGVPageView::eventFilter( TQObject* o, TQEvent* e ) { - if ( o == _page && e->type() == TQEvent::Resize ) { + if ( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(_page) && e->type() == TQEvent::Resize ) { // We need to call TQScrollView::eventFilter before centerContents, // otherwise a loop will be introduced. bool result = TQScrollView::eventFilter( o, e ); @@ -88,16 +88,16 @@ void KGVPageView::wheelEvent( TQWheelEvent *e ) } void KGVPageView::mousePressEvent( TQMouseEvent * e ) { - if ( e->button() & LeftButton ) + if ( e->button() & Qt::LeftButton ) { _dragGrabPos = e -> globalPos(); setCursor( sizeAllCursor ); } - else if ( e->button() & MidButton ) + else if ( e->button() & Qt::MidButton ) { emit ReadDown(); } - else if ( e -> button() & RightButton ) + else if ( e -> button() & Qt::RightButton ) { emit rightClick(); } @@ -105,7 +105,7 @@ void KGVPageView::mousePressEvent( TQMouseEvent * e ) void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) { - if ( e -> button() & LeftButton ) + if ( e -> button() & Qt::LeftButton ) { setCursor( arrowCursor ); } @@ -113,7 +113,7 @@ void KGVPageView::mouseReleaseEvent( TQMouseEvent *e ) void KGVPageView::mouseMoveEvent( TQMouseEvent * e ) { - if ( e->state() & LeftButton ) + if ( e->state() & Qt::LeftButton ) { TQPoint delta = _dragGrabPos - e->globalPos(); scrollBy( delta.x(), delta.y() ); @@ -126,7 +126,7 @@ bool KGVPageView::readUp() if( atTop() ) return false; else { - int newValue = QMAX( verticalScrollBar()->value() - height() + 50, + int newValue = TQMAX( verticalScrollBar()->value() - height() + 50, verticalScrollBar()->minValue() ); /* @@ -148,7 +148,7 @@ bool KGVPageView::readDown() if( atBottom() ) return false; else { - int newValue = QMIN( verticalScrollBar()->value() + height() - 50, + int newValue = TQMIN( verticalScrollBar()->value() + height() - 50, verticalScrollBar()->maxValue() ); /* -- cgit v1.2.1