diff -r 9c5b1510919f -r bf573002ff72 calendarui/views/src/calenweekcontainer.cpp --- a/calendarui/views/src/calenweekcontainer.cpp Wed Jun 09 09:40:23 2010 +0300 +++ b/calendarui/views/src/calenweekcontainer.cpp Mon Jun 21 15:38:59 2010 +0300 @@ -43,6 +43,7 @@ #include #include #include +#include //CGestureHelper #include "calendarui_debug.h" #include "calenweekcontainer.h" @@ -218,6 +219,7 @@ ResetSlotTable(); delete iBackgroundSkinContext; + delete iGestureControl; TRACE_EXIT_POINT; } @@ -424,7 +426,7 @@ // * Focus on instanceId and datetime // 2. Timed item, 1-n for each cell, on same/ different day // * Focus on datetime - if( itemInfo.HasInstance() && aInstAvailable) + if( itemInfo.HasInstance() && aInstAvailable && iViewPopulationComplete) { TCalenInstanceId instId = TCalenInstanceId::CreateL( *itemInfo.iInstance ); if( !itemInfo.IsTimed() ) // todo/anniv/memo @@ -1285,6 +1287,10 @@ iRow = EFalse; iTopRowDefault = EFalse; + iGestureControl = GestureHelper::CGestureHelper::NewL( *this ); + iGestureControl->SetDoubleTapEnabled( EFalse ); + iGestureControl->SetHoldingEnabled( EFalse ); + TRACE_EXIT_POINT; } @@ -2014,6 +2020,39 @@ return iTimedNote; } +// ---------------------------------------------------------------------------- +// CCalenMonthContainer::HandleGestureL +// +// ---------------------------------------------------------------------------- +void CCalenWeekContainer::HandleGestureL( const GestureHelper::MGestureEvent& aEvent ) + { + GestureHelper::TGestureCode code = aEvent.Code( GestureHelper::MGestureEvent::EAxisBoth ); + + switch ( code ) + { + case GestureHelper::EGestureStart: + { + iGestureHandled = EFalse; + break; + } + case GestureHelper::EGestureSwipeRight: + { + HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow ); + } + iGestureHandled = ETrue; + break; + + case GestureHelper::EGestureSwipeLeft: + { + HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow ); + } + iGestureHandled = ETrue; + break; + default: + // Other gestures are not handled here + break; + } + } // ---------------------------------------------------------------------------- // CCalenWeekContainer::HorizontalWeekMoveL @@ -2186,6 +2225,16 @@ return; } + if ( iGestureControl ) + { + iGestureControl->HandlePointerEventL( aPointerEvent ); + if ( iGestureHandled ) + { + TRACE_EXIT_POINT; + return; + } + } + switch(aPointerEvent.iType) { case TPointerEvent::EButton1Down: