equal
deleted
inserted
replaced
41 #include <calenagendautils.h> |
41 #include <calenagendautils.h> |
42 #include <calendateutils.h> |
42 #include <calendateutils.h> |
43 #include <mcalenpreview.h> |
43 #include <mcalenpreview.h> |
44 #include <Calendar.rsg> |
44 #include <Calendar.rsg> |
45 #include <csxhelp/cale.hlp.hrh> |
45 #include <csxhelp/cale.hlp.hrh> |
|
46 #include <gesturehelper.h> //CGestureHelper |
46 |
47 |
47 #include "calendarui_debug.h" |
48 #include "calendarui_debug.h" |
48 #include "calenweekcontainer.h" |
49 #include "calenweekcontainer.h" |
49 #include "calencontainerlayoutmanager.h" |
50 #include "calencontainerlayoutmanager.h" |
50 #include "calencontroller.h" |
51 #include "calencontroller.h" |
216 |
217 |
217 CleanupInstances(); |
218 CleanupInstances(); |
218 |
219 |
219 ResetSlotTable(); |
220 ResetSlotTable(); |
220 delete iBackgroundSkinContext; |
221 delete iBackgroundSkinContext; |
|
222 delete iGestureControl; |
221 |
223 |
222 TRACE_EXIT_POINT; |
224 TRACE_EXIT_POINT; |
223 } |
225 } |
224 |
226 |
225 |
227 |
422 // Focused item |
424 // Focused item |
423 // 1. Non-timed item, 1 for each cell, on same/ different day |
425 // 1. Non-timed item, 1 for each cell, on same/ different day |
424 // * Focus on instanceId and datetime |
426 // * Focus on instanceId and datetime |
425 // 2. Timed item, 1-n for each cell, on same/ different day |
427 // 2. Timed item, 1-n for each cell, on same/ different day |
426 // * Focus on datetime |
428 // * Focus on datetime |
427 if( itemInfo.HasInstance() && aInstAvailable) |
429 if( itemInfo.HasInstance() && aInstAvailable && iViewPopulationComplete) |
428 { |
430 { |
429 TCalenInstanceId instId = TCalenInstanceId::CreateL( *itemInfo.iInstance ); |
431 TCalenInstanceId instId = TCalenInstanceId::CreateL( *itemInfo.iInstance ); |
430 if( !itemInfo.IsTimed() ) // todo/anniv/memo |
432 if( !itemInfo.IsTimed() ) // todo/anniv/memo |
431 { |
433 { |
432 dt.SetHour( KNonTimedNoteDefautDisplayTime ); |
434 dt.SetHour( KNonTimedNoteDefautDisplayTime ); |
1283 PIM_TRAPD_HANDLE( CCalenWeekContainer::ConstructBackgroundContextL() ); |
1285 PIM_TRAPD_HANDLE( CCalenWeekContainer::ConstructBackgroundContextL() ); |
1284 |
1286 |
1285 iRow = EFalse; |
1287 iRow = EFalse; |
1286 iTopRowDefault = EFalse; |
1288 iTopRowDefault = EFalse; |
1287 |
1289 |
|
1290 iGestureControl = GestureHelper::CGestureHelper::NewL( *this ); |
|
1291 iGestureControl->SetDoubleTapEnabled( EFalse ); |
|
1292 iGestureControl->SetHoldingEnabled( EFalse ); |
|
1293 |
1288 TRACE_EXIT_POINT; |
1294 TRACE_EXIT_POINT; |
1289 } |
1295 } |
1290 |
1296 |
1291 void CCalenWeekContainer::ConstructBackgroundContextL() |
1297 void CCalenWeekContainer::ConstructBackgroundContextL() |
1292 { |
1298 { |
2012 |
2018 |
2013 TRACE_EXIT_POINT; |
2019 TRACE_EXIT_POINT; |
2014 return iTimedNote; |
2020 return iTimedNote; |
2015 } |
2021 } |
2016 |
2022 |
|
2023 // ---------------------------------------------------------------------------- |
|
2024 // CCalenMonthContainer::HandleGestureL |
|
2025 // |
|
2026 // ---------------------------------------------------------------------------- |
|
2027 void CCalenWeekContainer::HandleGestureL( const GestureHelper::MGestureEvent& aEvent ) |
|
2028 { |
|
2029 GestureHelper::TGestureCode code = aEvent.Code( GestureHelper::MGestureEvent::EAxisBoth ); |
|
2030 |
|
2031 switch ( code ) |
|
2032 { |
|
2033 case GestureHelper::EGestureStart: |
|
2034 { |
|
2035 iGestureHandled = EFalse; |
|
2036 break; |
|
2037 } |
|
2038 case GestureHelper::EGestureSwipeRight: |
|
2039 { |
|
2040 HandleNaviDecoratorEventL( EAknNaviDecoratorEventLeftTabArrow ); |
|
2041 } |
|
2042 iGestureHandled = ETrue; |
|
2043 break; |
|
2044 |
|
2045 case GestureHelper::EGestureSwipeLeft: |
|
2046 { |
|
2047 HandleNaviDecoratorEventL( EAknNaviDecoratorEventRightTabArrow ); |
|
2048 } |
|
2049 iGestureHandled = ETrue; |
|
2050 break; |
|
2051 default: |
|
2052 // Other gestures are not handled here |
|
2053 break; |
|
2054 } |
|
2055 } |
2017 |
2056 |
2018 // ---------------------------------------------------------------------------- |
2057 // ---------------------------------------------------------------------------- |
2019 // CCalenWeekContainer::HorizontalWeekMoveL |
2058 // CCalenWeekContainer::HorizontalWeekMoveL |
2020 // processing of a week move (from touch ui navi decoration) |
2059 // processing of a week move (from touch ui navi decoration) |
2021 // (other items were commented in a header). |
2060 // (other items were commented in a header). |
2182 control->HandlePointerEventL(aPointerEvent); |
2221 control->HandlePointerEventL(aPointerEvent); |
2183 } |
2222 } |
2184 } |
2223 } |
2185 } |
2224 } |
2186 return; |
2225 return; |
|
2226 } |
|
2227 |
|
2228 if ( iGestureControl ) |
|
2229 { |
|
2230 iGestureControl->HandlePointerEventL( aPointerEvent ); |
|
2231 if ( iGestureHandled ) |
|
2232 { |
|
2233 TRACE_EXIT_POINT; |
|
2234 return; |
|
2235 } |
2187 } |
2236 } |
2188 |
2237 |
2189 switch(aPointerEvent.iType) |
2238 switch(aPointerEvent.iType) |
2190 { |
2239 { |
2191 case TPointerEvent::EButton1Down: |
2240 case TPointerEvent::EButton1Down: |