diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-14 20:16:30 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-04-14 20:16:30 +0000 |
commit | 1c93fca14d9ce37499bcfdf994c660186a0b6f17 (patch) | |
tree | f2defe163a805a9e34a2142dfde4cdb5e49241e7 /korganizer/koagenda.cpp | |
parent | 67e29a054cfcb1b0d2fe6b0a316cf6b3eec087b7 (diff) | |
download | tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.tar.gz tdepim-1c93fca14d9ce37499bcfdf994c660186a0b6f17.zip |
Enable kdepim compilation under Qt4
This will likely break Qt3 compilation temporarily, which is an unintended side effect.
A third and final kdepim commit will repair Qt3 compilation shortly.
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1227946 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'korganizer/koagenda.cpp')
-rw-r--r-- | korganizer/koagenda.cpp | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/korganizer/koagenda.cpp b/korganizer/koagenda.cpp index bf25165b3..7172e01ff 100644 --- a/korganizer/koagenda.cpp +++ b/korganizer/koagenda.cpp @@ -255,7 +255,7 @@ void KOAgenda::init() // Grab key strokes for keyboard navigation of agenda. Seems to have no // effect. Has to be fixed. - setFocusPolicy( WheelFocus ); + setFocusPolicy( Qt::WheelFocus ); connect( &mScrollUpTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollUp() ) ); connect( &mScrollDownTimer, TQT_SIGNAL( timeout() ), TQT_SLOT( scrollDown() ) ); @@ -274,7 +274,7 @@ void KOAgenda::init() mClickedItem = 0; mActionItem = 0; - mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); + mResPair = tqMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); mActionType = NOP; mItemMoved = false; @@ -291,7 +291,7 @@ void KOAgenda::init() viewport()->update(); viewport()->setBackgroundMode( NoBackground ); - viewport()->setFocusPolicy( WheelFocus ); + viewport()->setFocusPolicy( Qt::WheelFocus ); setMinimumSize( 30, int( mGridSpacingY + 1 ) ); // setMaximumHeight(mGridSpacingY * mRows + 5); @@ -384,19 +384,19 @@ bool KOAgenda::eventFilter ( TQObject *object, TQEvent *event ) case TQEvent::MouseButtonDblClick: case TQEvent::MouseButtonRelease: case TQEvent::MouseMove: - return eventFilter_mouse( object, static_cast<TQMouseEvent *>( event ) ); + return eventFilter_mouse( object, TQT_TQMOUSEEVENT( event ) ); #ifndef TQT_NO_WHEELEVENT case TQEvent::Wheel: - return eventFilter_wheel( object, static_cast<TQWheelEvent *>( event ) ); + return eventFilter_wheel( object, TQT_TQWHEELEVENT( event ) ); #endif case TQEvent::KeyPress: case TQEvent::KeyRelease: - return eventFilter_key( object, static_cast<TQKeyEvent *>( event ) ); + return eventFilter_key( object, TQT_TQKEYEVENT( event ) ); case ( TQEvent::Leave ): if ( !mActionItem ) setCursor( arrowCursor ); - if ( object == viewport() ) + if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(viewport()) ) emit leaveAgenda(); return true; @@ -422,8 +422,8 @@ bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de ) { #ifndef KORG_NODND TQPoint viewportPos; - if ( object != viewport() && object != this ) { - viewportPos = static_cast<TQWidget *>( object )->mapToParent( de->pos() ); + if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) && TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(this) ) { + viewportPos = TQT_TQWIDGET( object )->mapToParent( de->pos() ); } else { viewportPos = de->pos(); } @@ -462,7 +462,7 @@ bool KOAgenda::eventFilter_drag( TQObject *object, TQDropEvent *de ) // FIXME: This is a bad hack, as the viewportToContents seems to be off by // 2000 (which is the left upper corner of the viewport). It works correctly // for agendaItems. - if ( object == this ) { + if ( TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(this) ) { pos = viewportPos + TQPoint( contentsX(), contentsY() ); } else { pos = viewportToContents( viewportPos ); @@ -526,10 +526,10 @@ bool KOAgenda::eventFilter_key( TQObject *, TQKeyEvent *ke ) case Key_Alt: break; default: - mTypeAheadEvents.append( new TQKeyEvent( ke->type(), ke->key(), + mTypeAheadEvents.append( TQT_TQEVENT( new TQKeyEvent( ke->type(), ke->key(), ke->ascii(), ke->state(), ke->text(), ke->isAutoRepeat(), - ke->count() ) ); + ke->count() ) ) ); if ( !mTypeAhead ) { mTypeAhead = true; emitNewEventForSelection(); @@ -565,7 +565,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e ) TQPoint viewportPos; bool accepted=false; if ( ( e->state() & ShiftButton) == ShiftButton ) { - if ( object != viewport() ) { + if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) ) { viewportPos = ( (TQWidget *) object )->mapToParent( e->pos() ); } else { viewportPos = e->pos(); @@ -574,19 +574,19 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e ) // e->type()<<" delta: "<< e->delta()<< endl; emit zoomView( -e->delta() , contentsToGrid( viewportToContents( viewportPos ) ), - TQt::Horizontal ); + Qt::Horizontal ); accepted=true; } if ( ( e->state() & ControlButton ) == ControlButton ){ - if ( object != viewport() ) { + if ( TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport()) ) { viewportPos = ( (TQWidget *)object )->mapToParent( e->pos() ); } else { viewportPos = e->pos(); } emit zoomView( -e->delta() , contentsToGrid( viewportToContents( viewportPos ) ), - TQt::Vertical ); + Qt::Vertical ); emit mousePosSignal(gridToContents(contentsToGrid(viewportToContents( viewportPos )))); accepted=true; } @@ -597,7 +597,7 @@ bool KOAgenda::eventFilter_wheel ( TQObject *object, TQWheelEvent *e ) bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) { TQPoint viewportPos; - if (object != viewport()) { + if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) { viewportPos = ((TQWidget *)object)->mapToParent(me->pos()); } else { viewportPos = me->pos(); @@ -606,8 +606,8 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) switch (me->type()) { case TQEvent::MouseButtonPress: // kdDebug(5850) << "koagenda: filtered button press" << endl; - if (object != viewport()) { - if (me->button() == RightButton) { + if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) { + if (me->button() == Qt::RightButton) { mClickedItem = dynamic_cast<KOAgendaItem *>(object); if (mClickedItem) { selectItem(mClickedItem); @@ -615,7 +615,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) mClickedItem->incidence(), mClickedItem->itemDate() ); } else { - return TQScrollView::eventFilter( object, me ); // pass through for use by multiagenda + return TQScrollView::eventFilter( TQT_TQOBJECT(object), TQT_TQEVENT(me) ); // pass through for use by multiagenda } } else { KOAgendaItem* item = dynamic_cast<KOAgendaItem *>(object); @@ -623,7 +623,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) Incidence *incidence = item->incidence(); if ( incidence->isReadOnly() ) { mActionItem = 0; - mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); + mResPair = tqMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); } else { mActionItem = item; mResPair = CalHelper::incSubResourceCalendar( mCalendar, incidence ); @@ -635,11 +635,11 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) // null. selectItem( item ); } else { - return TQScrollView::eventFilter( object, me ); // pass through for use by multiagenda + return TQScrollView::eventFilter( TQT_TQOBJECT(object), TQT_TQEVENT(me) ); // pass through for use by multiagenda } } } else { - if ( me->button() == RightButton ) { + if ( me->button() == Qt::RightButton ) { // if mouse pointer is not in selection, select the cell below the cursor TQPoint gpos = contentsToGrid( viewportToContents( viewportPos ) ); if ( !ptInSelection( gpos ) ) { @@ -657,12 +657,12 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) if ( !ptInSelection( gpos ) ) { selectItem(0); mActionItem = 0; - mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); + mResPair = tqMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); setCursor(arrowCursor); startSelectAction(viewportPos); } } - return TQScrollView::eventFilter( object, me ); // pass through for use by multiagenda + return TQScrollView::eventFilter( TQT_TQOBJECT(object), TQT_TQEVENT(me) ); // pass through for use by multiagenda } break; @@ -683,7 +683,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) // avoid an offset of a few pixels. Don't ask me why... TQPoint indicatorPos = gridToContents(contentsToGrid( viewportToContents( viewportPos ))); - if (object != viewport()) { + if (TQT_BASE_OBJECT(object) != TQT_BASE_OBJECT(viewport())) { KOAgendaItem *moveItem = dynamic_cast<KOAgendaItem *>(object); if (moveItem && !moveItem->incidence()->isReadOnly() ) { if (!mActionItem) @@ -722,7 +722,7 @@ bool KOAgenda::eventFilter_mouse(TQObject *object, TQMouseEvent *me) break; } case TQEvent::MouseButtonDblClick: - if (object == viewport()) { + if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(viewport())) { selectItem(0); TQPair<ResourceCalendar *, TQString>p = mCalendarView->viewSubResourceCalendar(); emit newEventSignal( p.first, p.second ); @@ -918,7 +918,7 @@ void KOAgenda::performItemAction(const TQPoint& viewportPos) emit startDragSignal( mActionItem->incidence() ); setCursor( arrowCursor ); mActionItem = 0; - mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); + mResPair = tqMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); mActionType = NOP; mItemMoved = false; return; @@ -952,7 +952,7 @@ void KOAgenda::performItemAction(const TQPoint& viewportPos) placeSubCells( mActionItem ); setCursor( arrowCursor ); mActionItem = 0; - mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); + mResPair = tqMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); mActionType = NOP; mItemMoved = false; return; @@ -1192,7 +1192,7 @@ void KOAgenda::endItemAction() } mActionItem = 0; - mResPair = qMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); + mResPair = tqMakePair( static_cast<ResourceCalendar *>( 0 ), TQString() ); mItemMoved = false; if ( multiModify ) { @@ -1557,7 +1557,7 @@ TQMemArray<int> KOAgenda::minContentsY() int ymin = item->cellYTop(); int index = item->cellXLeft(); if ( index>=0 && index<(int)(mSelectedDates.count()) ) { - if ( ymin < minArray[index] && mItemsToDelete.findRef( item ) == -1 ) + if ( ymin < minArray[index] && mItemsToDelete.tqfindRef( item ) == -1 ) minArray[index] = ymin; } } @@ -1574,7 +1574,7 @@ TQMemArray<int> KOAgenda::maxContentsY() int ymax = item->cellYBottom(); int index = item->cellXLeft(); if ( index>=0 && index<(int)(mSelectedDates.count()) ) { - if ( ymax > maxArray[index] && mItemsToDelete.findRef( item ) == -1 ) + if ( ymax > maxArray[index] && mItemsToDelete.tqfindRef( item ) == -1 ) maxArray[index] = ymax; } } @@ -1708,7 +1708,7 @@ void KOAgenda::insertMultiItem( Event *event, const TQDate &qd, int XBegin, int cellYBottom = rows() - 1; } - newtext = TQString("(%1/%2): ").arg( count ).arg( width ); + newtext = TQString("(%1/%2): ").tqarg( count ).tqarg( width ); newtext.append( event->summary() ); current = insertItem( event, qd, cellX, cellYTop, cellYBottom, count, width ); @@ -1769,7 +1769,7 @@ void KOAgenda::showAgendaItem( KOAgendaItem *agendaItem ) agendaItem->hide(); addChild( agendaItem ); - if ( !mItems.containsRef( agendaItem ) ) { + if ( !mItems.tqcontainsRef( agendaItem ) ) { mItems.append( agendaItem ); } placeSubCells( agendaItem ); |