diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-19 19:03:33 +0000 |
commit | e69e8b1d09fb579316595b4e6a850e717358a8b1 (patch) | |
tree | a24fc20865f65772f530d16177520190594ffdd2 /kghostview/kgvpageview.cpp | |
parent | eecec9afb81fdebb0f22e9da22635874c403f854 (diff) | |
download | tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.tar.gz tdegraphics-e69e8b1d09fb579316595b4e6a850e717358a8b1.zip |
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
Diffstat (limited to 'kghostview/kgvpageview.cpp')
-rw-r--r-- | kghostview/kgvpageview.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
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() ); /* |